call function after ajax success, complete and error

 <script>
$(document).ready(function(){
  $( document ).ajaxComplete(function() {
    console.log("AJAX request successfully completed.");
});
$(document).ajaxSuccess(function(){
console.log("AJAX request successfully success.");
});
$(document).ajaxError(function (event, jqxhr, settings) {
console.log("AJAX error.");
if (settings.url == "") {
}
});  
});
</script>

Leave a Reply