Example
Hover for a transition!
Hover for an animation!
Basic Usage
$('#transitionDemo').cssTransitionEnd(function(e){ // Called when transition ends });
$('#animationDemo').cssAnimationEnd(function(e){ // Called when animation ends });
Sometimes you may wish to have the what happens after a transition ends relate to something like a hover state. Below you can find one possible way to handle this. It's the same code used by the blue circle in the example above.
$('#transitionDemo').hover(function(){ $(this).addClass('active'); },function(){ $(this).removeClass('active'); }); $('#transitionDemo').cssTransitionEnd(function(e){ if($(this).hasClass('active')) console.log('Left circle is fully gray'); else console.log('Left circle is fully blue'); });