jenny-r
10/4/2018 - 6:10 PM

facetwp auto click link when only one result

facetwp auto click link when only one result

(function($) {
    $(document).on('facetwp-loaded', function() {
        if (1 === FWP.settings.pager.total_rows ) {
            $('.facetwp-template a:first')[0].click();
        }
    });
})(jQuery);