Skip to content
Snippets Groups Projects
Commit 9b764cb7 authored by Robin Appelman's avatar Robin Appelman
Browse files

show names of next/previous song when you hover the next/previous button

parent 28a64bc2
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,18 @@ var PlayList={
PlayList.player.jPlayer("play");
localStorage.setItem('oc_playlist_current',index);
localStorage.setItem('oc_playlist_playing','true');
if(index>=0){
var previous=index-1;
}else{
var previous=PlayList.items.length-1;
}
if(index+1<PlayList.items.length){
var next=index+1;
}else{
var next=0;
}
$('.jp-next').attr('title',PlayList.items[next].name);
$('.jp-previous').attr('title',PlayList.items[previous].name);
if (typeof Collection !== 'undefined') {
Collection.registerPlay();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment