Forum Discussion
Scroll Bar start position
Hi Russell... I have been using your javascript solution to manipulate the scroll position in my course. Thank you.
This solution works perfectly on the base slide. But now I need to manipulate scroll position on layers and this javascript does not work for layers. It would be great if you could let us know if/what edits can be made to apply this solution for scrolling panes on layers.
Thanks
Hello Alisha,
Take a look at this story file.
To scroll to the bottom, I'm using this code:
var x = document.getElementsByClassName("scrollarea-area")[0];
x.scrollTop = x.scrollHeight-x.offsetHeight;
If you have a second scroll area, you need to change the code to target the second one.
Notice the 0 is changed to 1.
var x = document.getElementsByClassName("scrollarea-area")[1];
x.scrollTop = x.scrollHeight-x.offsetHeight;
If you have a third scroll area, you need to change the code to target the third one.
This time it is set to 2.
var x = document.getElementsByClassName("scrollarea-area")[2];
x.scrollTop = x.scrollHeight-x.offsetHeight;
- MarkWoolway2 years agoCommunity Member
Thank you for this work around. It works perfectly. Thanks again for sharing.
Related Content
- 6 months ago
- 6 months ago