resetting scroll area back to the top when reopened

Q&A about the latest versions
Post Reply
Jmondo
Posts: 73
Joined: Thu Nov 16, 2017 11:10 am

Hi,

In the initial load of my site, I have a scrolling content box (with images and text). After this box is closed, there is a button to reopen it at any time. But when it reopens, the scroll area stays in the same area as when it was closed. Is there a way to reset the scroll area to the top when reopened?

Thanks in advance for any advice!
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

I've not had a need to do this myself- but perhaps including/invoking this javascript call would get things going-

https://api.jquery.com/scrollTop/ (Jquery)

or-

https://www.w3schools.com/jsref/prop_el ... olltop.asp (HTML DOM)
Post Reply