I want to scroll to the top whenever I click category from SC Categories Widget?

Gian1
Tera Contributor

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?

 

7 REPLIES 7

Community Alums
Not applicable

Hello Gian,

Why don't you try to use Top button at right side. So user can go to the top. Please check below threads if it fulfill your requirement .

How to add a SC Scroll to top widget in portal

https://community.servicenow.com/community?id=community_question&sys_id=3b2ee7f3db7ca3009d612926ca96...

 

Thanks
Akshay Kangankar
Please Mark Correct/helpful, if applicable, 

Hi Akshay,

 

I am aware of that button. What we want is when they click on a category that is all the way at the bottom of the list it should scroll back up rather than staying at the bottom of the page.

 

Thanks

 

Gian

AnirudhKumar
Mega Sage
Mega Sage

How about a page refresh?

The URL is already updated when one clicks on a category, a page refresh should bring the user back to the top.

But it requires a widget clone, right!? ready for that that kind of a trade off?

Hi Anirudhu,


Wouldn't mind testing it out. 

Do you have an example of a script for this?