Fixed some of the album selection stuff
This commit is contained in:
parent
d1a5a5385f
commit
bb7d66250b
@ -10,12 +10,25 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// on album art click
|
// on album art click
|
||||||
$('.music-album thumbnail').on('click', function() {
|
$('.music-album .thumbnail').on('click', function() {
|
||||||
// change selected album
|
// change selected album
|
||||||
changeSelectedAlbum(this);
|
changeSelectedAlbum(this);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function changeSelectedAlbum(albumElem) {
|
||||||
|
var oldSelected = $('.music-album.selected');
|
||||||
|
var newSelected = $(albumElem).parent();
|
||||||
|
|
||||||
|
if (oldSelected.data('albumid') != newSelected.data('albumid')) {
|
||||||
|
// remove selected class from the old element and add it to the new one
|
||||||
|
oldSelected.removeClass('selected');
|
||||||
|
newSelected.addClass('selected');
|
||||||
|
|
||||||
|
// change available songs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeSelectedAlbum(albumElem) {
|
function changeSelectedAlbum(albumElem) {
|
||||||
var oldSelected = $('.music-album.selected').parent();
|
var oldSelected = $('.music-album.selected').parent();
|
||||||
var newSelected = $(albumElem).parent();
|
var newSelected = $(albumElem).parent();
|
||||||
|
Loading…
Reference in New Issue
Block a user