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
I've been messing around with this as well.
I haven't found a way to do it cleanly within Template.template.events
.
The obvious temporary solution right now would be using a simple jQuery scroll event.
$(window).scroll(function(){//your code});
should do the trick.
Things I was trying to use as the selector but to no avail were:
'scroll *'
'scroll body'
'scroll document'
and naturally
'scroll window'
I tried all of these selectors inside of a generic template's events, along with on UI.body
's events, as that's the new blaze template that encompasses the page's body.
To reiterate: You're probably better off using jQuery for the time being.