Fixed album changing process
This commit is contained in:
parent
11e0377b36
commit
387c1b9c87
@ -4,13 +4,13 @@ $(document).ready(function() {
|
|||||||
player = $('#music-player').get(0);
|
player = $('#music-player').get(0);
|
||||||
|
|
||||||
// on music track click
|
// on music track click
|
||||||
$('.now-playing-list .music-track').on('click', function() {
|
$('.now-playing-list').on('click', 'music-track', function() {
|
||||||
// change selected track
|
// change selected track
|
||||||
changeSelectedTrack(this);
|
changeSelectedTrack(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
// on album art click
|
// on album art click
|
||||||
$('.music-album .thumbnail').on('click', function() {
|
$('.music-album').on('click', '.thumbnail', function() {
|
||||||
// change selected album
|
// change selected album
|
||||||
changeSelectedAlbum(this);
|
changeSelectedAlbum(this);
|
||||||
});
|
});
|
||||||
@ -60,11 +60,11 @@ function getAlbumSongs(albumElem) {
|
|||||||
|
|
||||||
var songElem = $('<li></li>')
|
var songElem = $('<li></li>')
|
||||||
.addClass('music-track')
|
.addClass('music-track')
|
||||||
.data('trackid', song.id)
|
.attr('data-trackid', song.id)
|
||||||
.data('title', song.title)
|
.attr('data-title', song.title)
|
||||||
.data('album', song.album_id)
|
.attr('data-album', song.album_id)
|
||||||
.data('order', song.track_order)
|
.attr('data-order', song.track_order)
|
||||||
.data('path', song.audio_file);
|
.attr('data-path', song.audio_file);
|
||||||
|
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
songElem.addClass('selected');
|
songElem.addClass('selected');
|
||||||
|
Loading…
Reference in New Issue
Block a user