Created
October 6, 2016 20:42
-
-
Save kkm/7caea0f4ee43e81d2df87b9829f2bdd9 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
var scrollToHash = function(hash, time) { | |
hash = hash || window.location.hash; | |
time = time || 1000; | |
k = Meteor.setInterval(function() { | |
try { | |
clearInterval(k); | |
console.log("XW", hash); | |
$('html,body').animate({ | |
scrollTop : $(hash).offset().top | |
}, time); | |
} catch (err) { | |
} | |
}, 200); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment