Posted By

marshallgmoore on 05/19/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

spee66


Jquery Chained Animation On Hover


 / 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.

  1. $('a').hover(function(){
  2. $(this).animate({'paddingLeft':'15px'},{queue:false,duration:120,complete: function(){
  3. $(this).animate({'marginBottom':'15px'},{queue:false,duration:120});
  4. }
  5. });
  6. },function(){
  7. $(this).animate({'paddingLeft':'0px'},{queue:false,duration:120,complete: function(){
  8. $(this).animate({'marginBottom':'0px'},{queue:false,duration:120});
  9. }
  10. });
  11. });

Report this snippet  

You need to login to post a comment.