FacetWP – intercept Genesis pagination

mgibbs189

{{gist file=”test.js” lang=”javascript”}}
(function($) {
$(document).on(‘click’, ‘.pagination a’, function(e) {
e.preventDefault();
var matches = $(this).attr(‘href’).match(//page/(d+)/);
if (null != matches) {
FWP.paged = parseInt(matches[1]);
}
FWP.soft_refresh = true;
FWP.refresh();
});
})(jQuery);
{{/gist}}