Skip to content

Instantly share code, notes, and snippets.

@nerdyworm
Created May 14, 2012 17:13
Show Gist options
  • Save nerdyworm/2695131 to your computer and use it in GitHub Desktop.
Save nerdyworm/2695131 to your computer and use it in GitHub Desktop.
$('.progress-bar').click(function(e) {
var playingSound = soundManager.getSoundById(_.keys(soundManager.sounds)[0]),
x = e.pageX - $(this).offset().left,
width = $(this).width(),
duration = playingSound.durationEstimate;
playingSound.setPosition((x / width) * duration);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment