Skip to content

Instantly share code, notes, and snippets.

@mataspetrikas
Created April 26, 2011 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mataspetrikas/941963 to your computer and use it in GitHub Desktop.
Save mataspetrikas/941963 to your computer and use it in GitHub Desktop.
jump link with the SC JS API
$('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