My issue at the moment is that I have a function that takes ~600ms to complete. If a user spam clicks the selector it invokes multiple calls. I have tried to stop spam clicking by disabling the click event callback when the function is called, however, this does not work. Is there any way to stop mouseclicks or remove queued callbacks.
$('.selector').click(function() {
$(this).off('click.disabled');
//DO STUFF
$(this).on('click.disabled', false);
});
Thanks!