Limited Time Discount - Save 10%

AJAX Before and After Events


This document explains how to use the AJAX custom events available in the Divi FilterGrid plugin.

Divi FilterGrid uses AJAX (Asynchronous JavaScript and XML) to update the grid results when a filter or pagination is clicked. AJAX allows us to update the results in the grid without having to refresh the entire page.

If you are applying custom javascript to the grid items, you’ll notice that this will only affect the original items in the grid when the page initially loaded. Once AJAX runs and the DOM is updated with new grid items, this custom javascript needs to run again so that it can be applied to the updated content.

To do this, you can attach your javascript to a function and then run that function after the page loads AND after the Divi FilterGrid AJAX After event fires. The following show both the before and after events:

Pin It on Pinterest

Share This