[Solved ]Why doesn't scrollTop work in Meteor

I’ve tried using scrollTop as well as scrollTop() and it always returns 0. How can this be, I’ve tried it like this:

        "click .examine": function(event){

            varPos = event.clientY;
            var yPos = document.body.scrollTop;
            console.log("Y coords: " + yPos);

as well as using the JQuery version on several div’s within and including the body tag, again all giving me 0 or null.

All I simply want is to get the number of pixels traversed on the y-axis as the user scroll downs the page.

Two quick things:

if you run document.body.scrollTop in your console, do you see the expected value?

And, try throwing a console.log(event) in your event to make sure it’s firing correctly.

Actually even though document.body.scrollTop returns 0, your idea to look at the event showed that event.pageY showed the correct number of vertical pixels scrolled. I was able to use that instead to resolve this. Thanks

No worries, glad it helped!