Created
April 26, 2011 08:01
-
-
Save mataspetrikas/941963 to your computer and use it in GitHub Desktop.
jump link with the SC JS API
This file contains 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
$('a.jump').live('click', function(event) { | |
event.preventDefault(); | |
var targetTime = $(this).attr('data-jump-target'); | |
player.api_play(); | |
player.api_seekTo(targetTime); | |
}); | |
// a typical link woul look like this, where the value in the data-jump-target is the time you want to jump to | |
<a href="#jump" class="jump" data-jump-target="455">Jump to 455</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment