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