Forum Discussion
ZacharyMehalick
2 years agoCommunity Member
Javascript scrollIntoView not working correctly
Hi so I'm trying to recreate this: https://www.youtube.com/watch?v=c_WjEe0qzUo&feature=youtu.be
I've changed the javascript to all be on one line but regardless it doesn't work correctly like it ...
PhilMayor
2 years agoSuper Hero
Works fine for me in Chrome https://360.articulate.com/review/content/6d17472c-7ee1-4d63-b0c9-916167bf3266/review
I had to edit the code to this
var section1 = document.querySelectorAll('[data-acc-text~="section1"]');
section1[0].scrollIntoView({block: "end",inline: "nearest"});
- ZacharyMehalick2 years agoCommunity Member
I have figured out my issue, apparently if the buttons are within the scroll box then it will not work properly. They have to be outside of it. Thank you all.