ajax beforesend
beforeSend: function() {
// setting a timeout
$(placeholder).addClass('loading');
},
Thoughtful Tamarin
beforeSend: function() {
// setting a timeout
$(placeholder).addClass('loading');
},
var xhr = $.ajax({
type: "GET",
url: "https://www.codegrepper.com/myapi.php",
success: function(response){
//do something
}
});
xhr.abort(); //kill the request