Header Ads

animate() method using jQuery

<html>
<head>
<script type="text/javascript" src="jquery-1.2.6.js"></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>

3 comments:

  1. What's up to every single one, it's actually a pleasant for me to pay a visit this
    web site, it includes useful Information.

    ReplyDelete
  2. I seriously love your website.. Great colors & theme.
    Did you make this amazing site yourself? Please reply back as
    I'm looking to create my very own website and would like to know where
    you got this from or what the theme is called. Many thanks!

    ReplyDelete
  3. Hello this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors
    or if you have to manually code with HTML. I'm starting a blog soon but have no coding expertise so I wanted to get guidance
    from someone with experience. Any help would be greatly appreciated!

    ReplyDelete

Powered by Blogger.