Jquery detect scroll once
Have read that it is possible to detect a scroll with this line: $('window').one('scroll', function() { } ); If have this inline code: var TimeVariable=setInterval(function(){ DoJQueryStuff() },300); function DoJQueryStuff() { if(typeof jQuery == "undefined") return; window.clearInterval(TimeVariable); $('body').one('mousemove', function() { alert('mouse'); } ); $('window').one('scroll', function() { alert('scroll'); } ); } DoJQueryStuff is called every 300 ms until JQuery is loaded. If I move the mouse anywhere on the screen, I got the "mouse" alert. If I scroll down I do NOT get the "scroll"