preventing ajax multiple calls

Subject:

ajax can cause multiple calls in my case.   The reason for this is because I am using the boostrap model and binding the #model-action-btn to $( document ) making this button bound to the document.instead use $( 'target' ).click() which will take care of unbinding it instead of doing $( document ).on( 'click' , 'target', function()){}

2017-05-18 15:06:58gstlouis

I don't see how this is true as I have another call that is doing multiple ajax calls after the first one is fired

using 

$('.donotsend, #modal-action-btn').click(function(){}

I had to unbind $( '.donotsend' ).unbind('click'); out side fo the ajax{}

gstlouis
vote
2017-09-13 10:25:42