Created
November 14, 2013 08:43
-
-
Save lerua83/7463490 to your computer and use it in GitHub Desktop.
jQuery - Function on toggleClass complete URL: http://stackoverflow.com/questions/10321393/jquery-function-on-toggleclass-complete
How can I do a function once a toggleClass has completed?
The .toggleClass method along with all other animation methods return a deferred object that you can access using .promise(). At that point, you can bind to i…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#loader").toggleClass('fadeOut',600).promise().done(function(){ | |
alert('a'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment