/ Published in: JavaScript
For user-friendly animations on hover event. Prevents repeating animations when hovering object many many times.
Example needs "jquery.color" plugin for color animations. But you can use any animations you want.
Expand |
Embed | Plain Text
$('a.coollink').hover(function(){ $(this).stop().animate({ // magic here, stop THIS object to animate // and do animate from begin backgroundColor: '#21545A', //animate what you want color: '#FFF' }, 500); }, function(){ $(this).stop().animate({ // magic here, stop THIS object to animate // and do animate from begin backgroundColor: '#FFF', //animate what you want color: '#797979' }, 500); });
You need to login to post a comment.
