I a code similar to the following
$(element).click(function() {
$(slider).slide();
});
What I want to do is to deactivate the click event until the sliding finish (or more precisely the function complete) so that users don’t abuse it. How can I do that?
http://jsfiddle.net/samccone/8u2KP/
The trick is to check if
if (!$('#slider').is(':animated')) {//CODE HERE}