Forums Forums Search & Filter Pro Page does not reload to the top of the page after clicking the filter button

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #2640

    Is there a way to get the page to reload to show the top of the page after someone clicks the filter button? Right now the page gives the correct filter results, but it stays at the height of the filter button, which is often too low for people to see the filter results.

    To say it a different way (hopefully to make this more understandable), right now visitors have to scroll up to the top of the page to see the filter results… many of them don’t expect that, or don’t understand that they have to scroll up, so they say the filter is broken even though the results of their search are just higher up on the page, out of sight unless they scroll up.

    Thanks for your help

    Ross Moderator
    #2714

    Hey Pamella

    This is quite simple to add in and will be integrated in the plugin in the future, but for now, in JS, you can listen for when Ajax has finished loading and then tell the browser to scroll to the top:

    $(".searchandfilter").on("sf:ajaxfinish",function(){
        $("html, body").animate({ scrollTop: 0 }, "slow");
    });

    Add this to your themes JS file in with the rest of the jQuery code and you should be fine 🙂

Viewing 2 posts - 1 through 2 (of 2 total)