Reputation: 8103
I would like to make a JS page with a variable $depth
. And this variable should be constantly adjusted, depending on how much pixels you've scrolled down to the pag.
But I have not a single clue how to write this. Is there anyone with some experience concerning this situation, or any clues how to tackle this issue?
Upvotes: 0
Views: 793
Reputation: 51176
Easy to do with JQuery:
$(window).scroll(function(e) {
var position = $(this).scrollTop();
}
Upvotes: 1