Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('a[href^="#"]').on('click', function (e) {
- e.preventDefault();
- let section = $(this).attr("href");
- if (section.length) {
- let offset = $(section).offset().top;
- $('html,body').animate({
- scrollTop: offset
- }, 600);
- }
- });
Add Comment
Please, Sign In to add comment