get the scroll position in pixels code example
Example: scroll position
$(window).scroll(function() {
var $height = $(window).scrollTop();
if($height > 50) {
//do something
} else {
//do something
}
});
$(window).scroll(function() {
var $height = $(window).scrollTop();
if($height > 50) {
//do something
} else {
//do something
}
});