I’ve tried using scrollTop as well as scrollTop() and it always returns 0. How can this be, I’ve tried it like this:
Template.myHome.events({
"click .examine": function(event){
event.preventDefault();
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.