You can use .abort()
on XMLHttpRequest that $.get
returns.
var req = $.get('ajax/test.html', function(data) {
$('.result').html(data);
alert('Load was performed.');
});
//Abort request
req.abort()
From jQuery.ajax() documentation:
The $.ajax() function returns the XMLHttpRequest object that it creates. Normally jQuery handles the creation of this object internally, but a custom function for manufacturing one can be specified using the xhr option. The returned object can generally be discarded, but does provide a lower-level interface for observing and manipulating the request. In particular, calling .abort() on the object will halt the request before it completes.
More on .abort()
: XMLHttpRequest.abort()
There is also jQuery plugin AjaxQueue for handling multiple Ajax request made in parallel.