jquery - How to properly utilize .scrollTop() -
could please let me know why not working?
$(window).scroll(function(){ if($(window).scrolltop() > 100){ alert("scroll in y > 100px!"); } });
i have tried quite few variations of code, none seem work.
can line 1 run alert function on own seems crash browser.
page linked jquery-1.9.1 , above code on external .js file , referenced.
relatively new jquery sorry if question elementary.
thank in advance!
Comments
Post a Comment