$('.class1').delay(3000).not(".class2").removeClass("pulse");
It will remove the class before delay!
how can I stop it and delay for 3s and then remove "pulse"?
$('.class1').delay(3000).not(".class2").removeClass("pulse");
It will remove the class before delay!
how can I stop it and delay for 3s and then remove "pulse"?
delay()
does not work for removeClass()
as it does not operate on the queue. You could use setTimeout()
instead:
setTimeout(function() {
$('.class1:not(.class2)').removeClass('pulse');
}, 3000);
Use setTimeout()
instead of the delay. That is a regular JS function:
setTimeout(function(){
$('.class1').not(".class2").removeClass("pulse");
}, 3000);