events - jQuery help with unbind then bind again after animation sequence -
I have the following JS functions and after the click event, I would like to stop anything and stop it. Allows the event to happen again when the function is finished.
$ ("# tweet_activate a"). Click (function () (if ($ ('body'). HasClass ('(' '= "154"}, 400) .Delay (1200). Fadeaut ();} and ($ ($ (at home)) ($ (This) .Parent (). "#int_comp"). Animate ({width: "+ = 157"}, 100); $ (this) .Parent () .pause (true, true) .mate {Top: "+ = 154"}, 400 $ ("+ = 56"}, 400); $ ("#tweet"). Delay (): $ (". = 56"}, 400); Derelli (1200) .ED ();} $ ("# tweet_text"). 900 (): ({true: "+ = 214"}, 400); $ ("# tweet_deactivate"). Delay (1200) .Fedine ); $ ("# Tweak_text p, #tweet_text span, #tweet #links") .Dele (1200) .Fedine ($) "$" ("# eye"). Delay (600) .fadeaut (); return back;} Animate ({width: "- $ (" 157 "}, 400);} $ (" $ ") ($ ('' body '') IfClass ('home')) {} else {$ (" # int_comp " # Tweet_text p, #tweet_text Stop (true, true). ("- = 56"}, 400); $ (this) .Parent (). Delay ( "- = 214"}, 400); $ ("# tweet_text") Delay (400). 900 (): ((Top: "- = 154"}, 400) .Delay (200). Fadeaut (). Dile (600) .mate ({top: "+ = 154"}, 100); $ ("(top:" - 154 "}, 500). Dele (650) .fadeine (); $ ("# Eye"). Delay (1000). Fadein (); Return back;}); The site is here -
If you click the 'plus' sign on the right icon grid, you will see the sequence. If you click on the middle of the icon, you will see it again.
Thank you, Matt
Just add a small test to the element. Once you start the animation, set a bull at the right, then click on the first check
var animating = false; $ ("Home") ($ ('home')) {$ (this). Original (). Stop (true, true). ({Head: "+ = 154"}, 400) .Delay (1200). FadeOut ();} and {$ ("# int_comp"). Animate ({width ("+ = 157"}, 100); $ (this) .Parent (.) Stop (true, true). ({Top: "+ = 154"}, 400) .Delay (1200) $ ("# Tweet_text"). Delay (400) .met ({true: "+ = 56"}, 400); $ ("# tweet"). Delay (900). Permission ({true: "$ (" 214 "}, 400); $ (" # tweet_deactivate "). Delay (1200) .fadeine (); $ (" #tweet_text p, #tweet_text span, #tweet #links "). Delay (1200 FadeIn (); $ ("# eye"). Delay (600). Fade (function () {animating = false; // This is an estimate, but give it a place where the animation is stopping.});} Return false;}); Try it should work. Click (function () ($ $ = $ (this); if ($ this.attr ("animated")! == " <"> $ ("# tweet_activate a"). ($ '(' '=' 154 ", 400) .Delay (1200). Fadeaut ('body'). Haclus ('home')) {$ this.parent (.) Stop (true, true) Animate ({width: "+ = 157"}, 100); $ The.parent (stop) (true, true). Sammet ({top: "+ = 154 "}, 400) .Delay (1200). Fadeaut ();} $ (" # tweak_text ") Delay (400 (): $ (" = = 214 "}, 400); $ ("True:" = 56 "}, 400); $ (" # tweets "). Delay (900). Delay (1200) .Fedine ($); $ (" #twk_textp, #tweet_text span, #tweet # Links "). Delay (1200) .Fedine (); $ (" # eye "). Delay (600) .FadeOut (function () {$ this.attr (" is-animated "," false ");}) ;} Return false;}); You can see that ART is ("animated"); I can not check in the main button because before I have applied the attribute Before that, the click event has been defined as odd, oh well, if you have an event Click to wrap the contents of the event as I did in the previous example just as it works. Unlike the previous example, though I'm adding an attribute to anchor tag here and reading to see if this animation In this way you can have several elements of this type of 'blocking' event
Comments
Post a Comment