jquery disable click until animation is fully complete
问题 i want to disable click function untill every code in it; initialized and completed. i read these articles and tried what they said but cant make it happen: event.preventDefault() vs. return false + Best way to remove an event handler in jQuery? + jQuery - Disable Click until all chained animations are complete i prepared simple example for this question: This is DEMO html <div class="ele">1</div> <div class="ele">2</div> <div class="ele">3</div> jQuery $('.ele').click(function() { if ( !$(