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 = $("#tn-main-wrap-wrap").scrollTop(); (function listenTime() { var scroll = $("#tn-main-wrap-wrap").scrollTop(); if (scroll !== lastScroll) { event(); lastScroll = scroll; }
var t = setTimeout(listenTime, 100);
})();
}