How to use animate() method using jQuery?
In this article I'm going to explain How to use animate() method using jQuery. Just drag and drop two button control to your asp.net web page.
In this article I'm going to explain How to use animate() method using jQuery. Just drag and drop two button control to your asp.net web page.
Example:-
<html>
<head>
<script type="text/javascript" src="jquery-1.2.6.js"></script>
</script>
<script>
$(document).ready(function()
{
$("#btnAnimate").click(function(){
$("#boxanimate").animate({height:"400px"});//Increase the height
});
$("#btnReset").click(function(){
$("#boxanimate").animate({height:"200px"});//Decrease the height
});
});
</script>
</head>
<body>
<button id="btnAnimate">Animate height</button>
<button id="btnReset">Reset height</button>
<div id="boxanimate" style="background:#2E4270;height:200px;width:200px;margin:7px;">
</div>
</body>
</html>