Skip to main content

How to add JavaScript before or after the ajax filter

Introduction​

Follow this step to add JavaScript after Ajax has completed or before it has started.

After it has completed​

If you want to run JavaSscript after the Ajax Filter has completed or if you have a plugin that is not working, and you need to reinitialise JavaScript code. To do so, add the following code to the integrations tab of Divi.

jQuery(document).on('divi_filter_completed', function(){
// ADD YOUR CODE HERE
});

Before it has started​

If you want to run JavaSscript before the Ajax Filter has started, add the following code to the integrations tab of Divi.

jQuery(document).on('divi_filter_before', function(){
// ADD YOUR CODE HERE
});

What's Next​