Team:UNITN-Trento/JS/Parts
From 2013.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
+ | var lastScroll = $(window).scrollTop(); | ||
(function listenTime() { | (function listenTime() { | ||
var scroll = $(window).scrollTop(); | var scroll = $(window).scrollTop(); |
Revision as of 12:30, 19 September 2013
var lastScroll = $(window).scrollTop(); (function listenTime() {
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()); }); });