I have a search input that listens to keyup
and change
to trigger an update of a listview via Ajax.
Looks like this:
input.on
I came across this problem before and what I ended up doing is saving the request on an object upon creation and test for a previously set one to abort it if necessary. You'd have to edit the function that triggers the ajax call. For example:
if ( ajaxRequest ) {
ajaxRequest.abort();
}
ajaxRequest = $.ajax({ ... }); // triggers ajax request and saves it
If the widget
function returns an ajax object then you can probably assign that to the variable instead of modifying the original ajax request.