Skip to content Skip to sidebar Skip to footer

Pure Javascript - Click And Scroll To Div Inside Div

I have the following HTML, with scrollbar:
Something
Something

Solution 1:

You can use the scrollIntoView function of JavaScript like this:

document.getElementById('child9').scrollIntoView()

Try it online

Post a Comment for "Pure Javascript - Click And Scroll To Div Inside Div"