Javascript examples for jQuery Method and Property:scrollTop
Changes elements while scrolling a body
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> <script type="text/javascript"> $(window).load(function(){/*from ww w.ja v a 2 s .c o m*/ $(document).scroll( function() { var top = $(this).scrollTop(); if(top > 147){ console.log("hey!"); } }); }); </script> </head> <body> <div style="height: 5000px;"></div> </body> </html>