My problem is the following: I would like to get x and y coordinates on window scroll, in order to determine whether if I'm into a determined section or not, to perform some effects.
I'm trying to do this with this code:
$(window).scroll(function(e) {
console.log(e.pageX + " " + e.pageY);
});
Obviously this is only an example. I've already calculated the precise coordinates of all my sections, and all I need are the current coordinates when the scroll event is triggered.
I don't know why, but with the code posted above, in the console, I get "undefined undefined".
If anyone can help me, I would appreciate it very much. Thanks in advance for the future answers.