Team:UNITN-Trento/JS/Library/onScrollChange
From 2013.igem.org
/**
* onScrollChange (oSch) event handler * @version onScrollChange 1.0 * @copyright Copyright (c) 2010-2012, Gabriele Girelli * @author ggirelli <g.girelli@studenti.unitn.it> */
function oSch(event) {
var lastScroll = $(window).scrollTop(); (function listenTime() { var scroll = $(window).scrollTop(); if (scroll !== lastScroll) { event(); lastScroll = scroll; }
var t = setTimeout(listenTime, 100);
})();
}