- This topic has 1 reply, 2 voices, and was last updated 10 years, 4 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Page does not reload to the top of the page after clicking the filter button
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
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 🙂
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.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy