Answers for "js scroll to section"

12

smooth scroll css

html {
  scroll-behavior: smooth;
}

/* No support in IE, or Safari
You can use this JS polyfill for those */
http://iamdustan.com/smoothscroll/
Posted by: Guest on March-18-2020
0

a scroll to div js

//scroll to id
    var $root = $('html, body');
    $('a[href^="#"]').click(function () {
        var href = $.attr(this, 'href');
        $root.animate({
            scrollTop: $(href).offset().top
        }, 500, function () {
            window.location.hash = href;
        });

        return false;
    });
Posted by: Guest on September-14-2021
0

how to create a smooth effect in javasript

how to create a smooth effect in javascript
Posted by: Guest on January-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language