godsent Posted January 30, 2012 Share Posted January 30, 2012 For example if the object is programmed to animate, and you click on it multiple times before it finishes the animation, the animation will repeat for as many times as you clicked. How can this be avoided? If I have a POST method instead of animation, it can be spammed and cause difficulties. I know button can be disabled after click, but what if the the clicking object is <img> ? Quote Link to comment https://forums.phpfreaks.com/topic/256046-jquery-how-to-avoid-multiple-clicking/ Share on other sites More sharing options...
Adam Posted January 30, 2012 Share Posted January 30, 2012 There's a pseudo-selector you can use to check if an element is currently in animation: if ($('#element').is(':animated')) { // ... } Quote Link to comment https://forums.phpfreaks.com/topic/256046-jquery-how-to-avoid-multiple-clicking/#findComment-1312612 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.