Manixa Posted December 22, 2011 Share Posted December 22, 2011 Im sure most of you who have used jquery to animate stuff have ran into this problem. I have a few animations using the .animate function and my problem is that when I rapidly trigger the animation it starts doing it the amount of times I have clicked, my question is how can I code it that so when I click it starts the animation and disregards any farther clicking untill the animation is over? Link to comment https://forums.phpfreaks.com/topic/253680-jquery-timing-issue/ Share on other sites More sharing options...
scootstah Posted December 22, 2011 Share Posted December 22, 2011 Use .stop() before the animation. Link to comment https://forums.phpfreaks.com/topic/253680-jquery-timing-issue/#findComment-1300504 Share on other sites More sharing options...
Manixa Posted December 22, 2011 Author Share Posted December 22, 2011 no, not really, I just want the function that triggers the animation to be disabled for the duration of the animation.. something like that :? Link to comment https://forums.phpfreaks.com/topic/253680-jquery-timing-issue/#findComment-1300507 Share on other sites More sharing options...
scootstah Posted December 22, 2011 Share Posted December 22, 2011 You could do something like set a disable variable to false. Then before your animation, if disable == true, don't run the animation. If not, set to true and then after the animation runs set back to false. Link to comment https://forums.phpfreaks.com/topic/253680-jquery-timing-issue/#findComment-1300509 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.