This is a very little jQuery extension that allow to add an effect to an presetting event. jQuery.ui.effects required. retroEffect(event,effect,options,duration,callback) Example :
retroEffect(event,effect,options,duration,callback)
$('body').click(function(){ alert('1') }).click(function(){ alert('2') }) .retroEffect('click','highlight',{},'slow',function(){ alert('3') }) .click(function(){ alert('4') }).click(function(){ alert('5') });
The result :
Start Effect -> alert(4) - alert(5) End Effect -> alert(3) - alert(1) - alert(2)