/ Published in: jQuery
A simple example of using jQuery animate for an animation effect.
Expand |
Embed | Plain Text
<!doctype html> <html> <head> <!--A simple example of using jQuery animate for an animation effect --> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#clickme").click(function(){ $(this).animate({ left: '+=100', top: '+=100' },500,function(){}); }); }); </script> </head> <body> <div id="clickme" align="center" style="background-color:red;position:absolute;left:0;top:0;width:100px;">Click here</div> </body></html>
You need to login to post a comment.
