Team:UNITN-Trento/JS/Parts
From 2013.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
alert(lastScroll); | alert(lastScroll); | ||
(function listenTime() { | (function listenTime() { | ||
+ | alert(1); | ||
var scroll = $(window).scrollTop(); | var scroll = $(window).scrollTop(); | ||
if (scroll !== lastScroll) { | if (scroll !== lastScroll) { |
Revision as of 12:31, 19 September 2013
var lastScroll = $(window).scrollTop(); alert(lastScroll); (function listenTime() { alert(1);
var scroll = $(window).scrollTop(); if (scroll !== lastScroll) { event(); lastScroll = scroll; alert(scroll+" - "+lastScroll); }
var t = setTimeout(listenTime, 100);
})();
$(document).ready(function() { oSch(function() { alert($.scrollTop()); }); });