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 ...
Jürgen_Schoene_
Community Member
you have to add the "names of the objects" for the search to the "Alternate Text"
document.querySelectorAll('[data-acc-text="section2"]')[0].scrollIntoView();
ZacharyMehalick
2 years agoCommunity Member
If you scroll down further in the scroll box you'll see that there's similarly colored boxes that have the requisite "Alternate Text". The colored boxes at the top should scroll to each one of the similar color below. Otherwise the published file wouldn't have them doing anything at all rather than just slightly scrolling downwards.