-
-
Save mgibbs189/d1dd8b48faf82b7015c414b7d15d78f4 to your computer and use it in GitHub Desktop.
facetwp - click event to reset individual facet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).on('click', '#reset', function() { | |
FWP.is_reset = true; | |
FWP.facets['my_facet'] = []; // set facet to no selections | |
delete FWP.facets['paged']; // remove "paged" from URL | |
FWP.refresh(); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment