Skip to content

Instantly share code, notes, and snippets.

@dyaa
Created September 30, 2013 14:38
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyaa/6764748 to your computer and use it in GitHub Desktop.
Save dyaa/6764748 to your computer and use it in GitHub Desktop.
#jplayer display the current song name in the main box
var myPlaylist = new jPlayerPlaylist({
//then this will capture the current song's title:
//myPlaylist.playlist[myPlaylist.current].title
//For instance, I used this to capture the current song's title and insert it into a div on my page with id 'current-track':
var myPlaylist = new jPlayerPlaylist({ the playlist });
$("#jquery_jplayer_1").bind($.jPlayer.event.play, function(event) {
$('#current-track').empty();
$('#current-track').append(myPlaylist.playlist[myPlaylist.current].title);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment