Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery scroll to element

$("#button").click(function() {
    $([document.documentElement, document.body]).animate({
        scrollTop: $("#elementtoScrollToID").offset().top
    }, 2000);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #scroll #element
ADD COMMENT
Topic
Name
6+9 =