I couldn\'t find a scroll event for meteor in the meteor docs. How do I go about doing something as someone scrolls the window down in a meteor application?
I\'ve tried
As a partial solution, you can listen for the mousewheel
event on whatever element you care about. A lot of times this is exactly what you want anyways.
As an example, the following event listener will prevent the user from scrolling with the scroll wheel at all, but they will still be able to use the navigation bar on the side of the page. (If you have not disabled it with overflowy: hidden;
)
Template.body.events({
'mousewheel': function(event, template) {
console.log("scrolled");
return false;
}
});