jQuery disable enable click event with fade -
how can disable click event before fadein , enable after fadeout? my js code: $('a').click(function(){ // disable click $('div').fadeout(400, function(){ $(this) .css('background','yellow') .fadein(1800, function(){} // enable click );}); }); i coulda use stop() need disable/enable plz modify http://jsfiddle.net/wbwrm/1/ thx add class element, , don't run event when class there. $('a').click(function () { var $this = $(this); if ($this.hasclass('noclick')) return; // disable click $this.addclass('noclick'); $('div').fadeout(400, function () { $(this).css('background', 'yellow').fadein(1800, function () { // enable click $this.removeclass('noclick'); }); }); });