Forum Discussion
LisaStruebing
12 years agoCommunity Member
Scroll Bar start position
Is there a way to have the scroll bars start with the bar at the bottom of the window/list instead of the top? I'm doing a software simulation and the scroll windows in the software always have the...
ChrisPim-7dc640
6 years agoCommunity Member
That's really cool - thanks. So how could you scroll, say, to the middle?
Chris
RussellKillips-
6 years agoCommunity Member
Try dividing the scrollHeight by 2 to get to the middle.
var x = document.getElementsByClassName("scrollarea-area");
x[0].scrollTop = x[0].scrollHeight/2;
- KristinaMarinch5 years agoCommunity Member
Russel, you saved me with this code. Thank you very much!
Related Content
- 8 months ago
- 8 months ago