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
/* | |
* Smooth Scroll on Pageload | |
* Smooth scrolling on page load if URL have a hash | |
* Author: Franco Moya - @iamravenous | |
*/ | |
if (window.location.hash) { | |
var hash = window.location.hash; | |
if ($(hash).length) { |
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
/* | |
* Smooth scroll to anchor link | |
* Automatically detects the hash and scroll smoothly to anchor link with URL hashchange | |
* Author: Franco Moya - @iamravenous | |
*/ | |
// If you need more autonomy, | |
// You can replace hash detection with a data-attribute | |
// e.g. $("[data-scroll='smooth']") |
OlderNewer