Last active
April 6, 2021 13:00
-
-
Save Korveld/f4197aa9c8269b057b2744e4b8b8087b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.js-scroll-to').on('click', function(e) { | |
e.preventDefault() | |
$('html, body').animate({ | |
scrollTop: $($(this).attr('href')).offset().top | |
}, 1000); | |
}) | |
if ($(window.location.hash).length > 1) { | |
$("html, body").animate({ | |
scrollTop: $(window.location.hash).offset().top | |
}, 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment