Set timeout not working in jQuery sequnce -
I have a jQuery function written. What I would like to do in the function To remove unwanted elements for FadeToggle, the pod expanded class itself applies to itself before the selected division. For any reason, whenever I add a set timeout wrapped wrap around the toggle class, the section does not work while expanding the toggle class. Without the setTimout function works fine but I have to delay the second part of the code until the first part is over.
Here's my code:
jQuery (document) .on ('click', '.portfoliopod', function () {jQuery ('portfoliopod'). JQuery (it)). Fadegotley (500); Set timeout (function () {jQuery (this). Toggle class ('podexpended');}, 600); JQuery (this). Toggleclouds ("Portfolimzzoom"); JQuery it). Children ("Portofoyed Messages"). ToggleClass ('hiddenopod'); Setimmeet (function () {jQuery ("Portfolios of Image"). ToggleClass ('PortfolioFileLarge');}, 400);}); Before any setTimeout call, add:
< Code> var th = jQuery (this); Then in the timeout, we work instead of jQuery in this way:
th.toggleClass ('podexpanded');
Comments
Post a Comment