jquery - Check if element is in the fadeIn or fadeOut state ('action') -


i need stop(cancel) current .fadein(5000) , start same fadein beginning, once button clicked (otherwise next fadein start after 5000). how can check, if div actively fading , how can cancel (i assume .hide())?

use .stop(). don't need test if fadein running, if not, stop has not effect.

you still have hide though. like:

$('selector').stop(true).hide().fadein(5000); 

Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -