Created
September 13, 2011 10:34
-
-
Save lamp/1213563 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function(){ | |
| var intervals = []; | |
| $("#scroller-inner").children('div').each(function(k, v){ | |
| intervals.push(parseInt($(this).attr('id').split('-')[1])); | |
| }) | |
| setInterval(function(){ | |
| if(typeof(player.isSessionReady) == 'undefined') return; | |
| if(!player.isSessionReady()) return; | |
| var offset = Math.round(player.getOffset()); | |
| var filtered = []; | |
| $.each(intervals, function(i, v){ | |
| if(v <= offset){ | |
| filtered.push(v) | |
| } | |
| }); | |
| $('.thumb-seek').removeClass('thumb-current'); | |
| $('#seek-' + filtered.reverse()[0]).addClass('thumb-current'); | |
| }, 1000); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment