How to execute jQuery code whenever there is an ajax call on your website?

Problem: You changed the value of an element using jQuery however, that value resets when you click on a button that updates the data using ajax.

Here is a quick fix that will make your jQuery code execute on every ajax call. You will replace the console.log line with your code.

 

jQuery( document ).ajaxComplete(function($) {
console.log( "Triggered ajaxComplete handler." );
});

 

Leave a Comment

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

Scroll to Top

Welcome
Choose your language