|

How to check if there is an ajax running on your page?

How to check if there is an ajax running on your page? Here’s a code below that can help you figure it out.

jQuery( document ).ready(function($) {  
    $(document).ajaxStart( function() { 
       	console.log('ajax true' ); 
    }).ajaxStop( function() {
   		console.log('ajax false' );
    }); 
});

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *