Hi There,
I’ve been stumbling upon something very basic.
How does the page automatically scroll to top after reload or clicking on a new route?
I’m using iron router
okgrow:router-autoscroll is not working in chrome as seen here:
I found this snippet in this forum but it’s not working, either:
Tracker.autorun(function () {
var current = Router.current();
Tracker.afterFlush(function () {
// Scroll window to top, like a real page reload.
window.scrollTo(0, 0);
// If the menu is currently open, collapse it.
if ($('.navbar .navbar-collapse.collapse.in').length > 0) {
$('.navbar .navbar-toggle').click();
}
});
});
Any help highly appreciated