diff --git a/public/js/music.js b/public/js/music.js index 688e592..2a9859c 100755 --- a/public/js/music.js +++ b/public/js/music.js @@ -17,6 +17,12 @@ $(document).ready(function() { // change selected album changeSelectedAlbum(this); }); + + // on track end + player.on('ended', function() { + // find selected track + changeSelectedTrack($('.music-track.selected').next()); + }); }); function changeSelectedAlbum(albumElem) {