Answers for "how can when click buton scrool to another elemtn"

0

how can when click buton scrool to another elemtn

$("button").click(function() {
    $('html,body').animate({
        scrollTop: $(".second").offset().top},
        'slow');
});

// example: http://jsfiddle.net/ryXFt/3/
Posted by: Guest on December-15-2020
-1

scroll to specific div

$(window).scroll(function() {
    $('html, body').animate({
        scrollTop: $("#myDiv").offset().top
    }, 2000);
});
Posted by: Guest on March-24-2020

Code answers related to "how can when click buton scrool to another elemtn"

Code answers related to "Javascript"

Browse Popular Code Answers by Language