Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var router = Router.create({
- routes: routes,
- location: Router.HistoryLocation,
- scrollBehavior: {
- updateScrollPosition: function updateScrollPosition() {
- var hash = window.location.hash;
- if (hash) {
- var element = document.querySelector(hash);
- if (element) {
- element.scrollIntoView();
- }
- } else {
- window.scrollTo(0, 0);
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement