Return to Snippet

Revision: 8407
at October 16, 2008 10:39 by DesTincT


Updated Code
$('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);
	
});

Revision: 8406
at September 18, 2008 15:04 by DesTincT


Updated Code
$('a.coollink').hover(function(){

  $(this).stop().animate({	// magic here, stop THIS object to animate
                                // and do animate from begin	
    backgroundColor: '#21545A',
    color: '#FFF'
  }, 500);

}, function(){

  $(this).stop().animate({	// magic here, stop THIS object to animate
                                // and do animate from begin	
    backgroundColor: '#FFF',
    color: '#797979'
    }, 500);
	
});

Revision: 8405
at September 18, 2008 15:03 by DesTincT


Initial Code
$('.taxonomy a').hover(function(){

  $(this).stop().animate({	// magic here, stop THIS object to animate
                                // and do animate from begin	
    backgroundColor: '#21545A',
    color: '#FFF'
  }, 500);

}, function(){

  $(this).stop().animate({	// magic here, stop THIS object to animate
                                // and do animate from begin	
    backgroundColor: '#FFF',
    color: '#797979'
    }, 500);
	
});

Initial URL


Initial Description
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.

Initial Title
Stop animations on multiple hovering

Initial Tags
jquery, animation

Initial Language
JavaScript