Team:UNITN-Trento/JS/Parts

From 2013.igem.org

(Difference between revisions)
(Created page with "$(document).ready(function() { oSch(function() { alert($.scrollTop()); }); });")
Line 1: Line 1:
 +
(function listenTime() {
 +
    var scroll = $(window).scrollTop();
 +
    if (scroll !== lastScroll) {
 +
        event();
 +
        lastScroll = scroll;
 +
        alert(scroll+" - "+lastScroll);
 +
    }
 +
 +
    var t = setTimeout(listenTime, 100);
 +
})();
 +
$(document).ready(function() {
$(document).ready(function() {
oSch(function() {
oSch(function() {

Revision as of 12:29, 19 September 2013

(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()); }); });