Page does not reload to the top of the page after clicking the filter button

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)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.