Learn free online HTML5, javascript, and jquery Tutorials by Examples

Tuesday 17 November 2015

How to detect scroll position of page using jQuery ?

$(window).scroll( function() { 
 var scrolled_val = $(document).scrollTop().valueOf();
 alert(scrolled_val+ ' = scroll position');
});

No comments:

Post a Comment