facetwp submit with no refresh

djrmom

{{gist file=”submit.js” lang=”javascript”}}
(function($) {
$(document).on(‘click’, ‘.fwp-submit’, function() {
var href = $(this).attr(‘data-href’);
FWP.parse_facets();
var query_string = FWP.build_query_string();
query_string = (” == query_string) ? ” : ‘?’ + query_string;
window.location.href = href + query_string;
});
})(jQuery);
{{/gist}}