Test case for jQuery Ticket 7787
ajax abort
by jitter
HTML
<script src="http://getfirebug.com/firebug-lite-debug.js"></script>
<p><input id="foo" type="text" /></p>
JavaScript
var bla, i = 0;
$(function() {
$("#foo").bind("keyup", function() {
if( bla ) {
bla.abort();
}
bla = $.ajax({
url: "/echo/html/",
type: "POST",
dataType: "html",
data: {
html: "<p>foo" + i+++"</p>",
delay: 2
},
success: function(data) {
bla = null;
console.log(data);
},
error: function(xhr, status, err) {
console.log(status, err);
}
});
});
})