Answers for "scroll an element in html with a button"

0

scroll an element in html with a button

function scrollintoid(text)
{
    var my_element = document.getElementById(text);
    my_element.scrollIntoView
    ({
    behavior: "smooth",//does not work for me...
    block: "start",
    inline: "nearest"
    
    });
}
Posted by: Guest on January-09-2022

Code answers related to "scroll an element in html with a button"

Browse Popular Code Answers by Language