Reputation: 469
I am trying to fade in/out the class about div using js function provided. But this method is not working i need some solution for this problem. your solution will be kindly appreciated.
ASPX FILE :
<body>
<form id="form1" runat="server" >
<div>
<input class="btn1" type="button" value="button" />
<input class="btn2" type="button" value="button" />
<div class="about" runat="server" >
<div class="style2">
<strong><span class="style3">About</span></strong>
</div>
<hr />
<p class="style2">
About DIV
</p>
</div>
</div>
</form>
JAVA Script file
<script type="text/javascript">
$(document).ready(function () {
$(".btn1").click(function () {
$(".about").fadeOut()
});
$(".btn2").click(function () {
$(".about").fadeIn();
});
});
</script>
Upvotes: 0
Views: 70
Reputation: 4446
Make sure you are importing jquery
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
And take a look at this example http://jsfiddle.net/3Lbjx249/
Upvotes: 5