Skip to content Skip to sidebar Skip to footer

How To Control Jquery Animate Speed

i am working with jquery for animate a div. i want to control speed on moving. i played lot of with this. but i hope some one can tell me how can i control the speed. here is the c

Solution 1:

just change slow with the time in milliseconds, e.g. for 1,2 seconds just do

$('#block').animate({'left':'17px','top':'10px'},  1200, function() {
...

Solution 2:

The default duration is 400 milliseconds. The strings 'fast' and 'slow' corresponds to 200 and 600 milliseconds, respectively.

$('#block').animate({'left':'17px','top':'10px'},'slow',function(){


        });

Post a Comment for "How To Control Jquery Animate Speed"