facetwp-refresh

Overview

This jQuery event gets triggered before FacetWP begins the refresh process. It happens before any AJAX is requested, and before the URL hash gets updated. This event is useful for modifying any FWP variables before getting sent to the server.

Usage

<script>
(function($) {
    $(document).on('facetwp-refresh', function() {
        FWP.facets['my_facet'] = [10, 20, 30]; // Change a facet value
     });
})(jQuery);
</script>

More examples

See Also

facetwp-loaded

How FacetWP stores its javascript data