Skip to content

Instantly share code, notes, and snippets.

@Crocoblock
Created February 7, 2024 13:53
Show Gist options
  • Save Crocoblock/d02643683afd3d383f274226e83dfa27 to your computer and use it in GitHub Desktop.
Save Crocoblock/d02643683afd3d383f274226e83dfa27 to your computer and use it in GitHub Desktop.
JetSmartFilters Apply reload type filter on filter change
<script>
document.addEventListener( 'jet-smart-filters/inited', function( initEvent ) {
JetSmartFilters.events.subscribe( 'fiter/change', function( filter ) {
if ( ! filter?.$container?.closest( '.jet-smart-filters-instant-apply' ).length ) {
return;
}
filter.filterGroup.apply( filter.applyType );
} );
} );
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment