I want to scroll to the top whenever I click category from SC Categories Widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2022 01:45 PM
We have a requirement, when we select Categories on the left handside that it should automatically scroll back up. At the moment if a category is all the way at the bottom and click on that category, the users think that the page is blank and end up generating unnecessary calls.
How do I go about fixing this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 04:28 PM
Hi Gian,
window.location.reload();
You can this line in script to refresh the page
Mark Correct or Helpul if it helps.
Thanks,
Yousaf
***Mark Correct or Helpful if it helps.***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2022 07:59 AM
Hello,
Please suggest where to add this line specifically in javascript. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 07:15 PM
Hello ,
While click on thr category they must have called a client side function .
Can you put below code in that function and try
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
Please mark my answer correct if it helped you