var scrubpoint = 0; var isScrolling = null; $(document).on('mousewheel', function (e) { e.preventDefault(); if ( e.deltaY != 0 && Math.abs(e.deltaY) > 5 ) { if ( !isScrolling ) { $('video').each( function (i, ele) { ele.pause() } ); } master.pause(); scrubpoint = ( e.deltaY / Math.abs(e.deltaY) ); if ( !!isScrolling ) { clearTimeout( isScrolling ); isScrolling = null; } isScrolling = setTimeout( function () { isScrolling = null; master.play(); scrubpoint = 0; }, 500 ); } //console.log(e); }); TweenMax.ticker.addEventListener('tick', function () { var scrollmod = scrubpoint / -10; if ( isScrolling && master.time() + scrollmod > 0.01 && master.time() + scrollmod < master.duration() - 0.01 ) { master.seek( master.time() + scrollmod ); } });