Ensure function has completed before allowing another Ajax call
I usually use CSS classes to control AJAX requests affecting a specific element. This way you can prevent unwanted AJAX requests on that element, while other AJAX requests may still be triggered, being bound to other elements. $(‘.slot’).on(‘click’, ‘a.book’, function(e) { e.preventDefault(); // Check if doing ajax if($(this).hasClass(“doing-ajax”)) return false; $(this).addClass(“doing-ajax”); var user = $(‘#rjb_day’).attr( … Read more