/ Published in: jQuery
This is the syntax for a chained animation on hover. The included animations probably aren't very useful, but could easily be changed out with addClass or other css attributes... Or other animations of other properties. God, I don't know. I hope some lucky bastard finds this useful.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('a').hover(function(){ $(this).animate({'paddingLeft':'15px'},{queue:false,duration:120,complete: function(){ $(this).animate({'marginBottom':'15px'},{queue:false,duration:120}); } }); },function(){ $(this).animate({'paddingLeft':'0px'},{queue:false,duration:120,complete: function(){ $(this).animate({'marginBottom':'0px'},{queue:false,duration:120}); } }); });