jQuery Animate
jQuery animate() Creates custom animations on the elements.
Syntax of jQuery animate
$(selector).animate({parameters},speed,callback);
Animate Example
<script type="text/javascript">// <![CDATA[ $(document).ready(function(){ $("#animateButton").click(function(){ $("#demoDiv").animate({left:'100px',top:'100px'},"slow"); }); }); // ]]></script> |
Animate More Examples
Animate Example With milliseconds
<script type="text/javascript">// <![CDATA[ $(document).ready(function(){ $("#animateButton").click(function(){ $("#demoDiv").animate({left:'100px',top:'100px',height:'200px',width:'200px'},1000); }); }); // ]]></script> |
Animate Some Common Examples
[table width=”100%” colwidth=”20|190|50″ colalign=”left|left|center|left|right”]
No, Slide Animate Effect ,Syntax, Example & Demo
1,Animate Background Color, $(selector).animate({background:’yellow’});,See Detail & Demo »
2,Animate Background Color “slow”, $(selector).animate({background:’yellow’}\,”slow”);,See Detail & Demo »
3,Animate Background Color “fast”, $(selector).animate({background:’yellow’}\,”fast”);,See Detail & Demo »
4,Animate Background Color “milliseconds”, $(selector).animate({background:’yellow’}\,1000);,See Detail & Demo »
[/table]
Advertisements