diff --git a/scripts/album-info.js b/scripts/album-info.js index e69de29b..8fb1ae42 100644 --- a/scripts/album-info.js +++ b/scripts/album-info.js @@ -0,0 +1,6 @@ +{ + $('#album-title').text(album.title); + $('img#album-cover-art').attr('src', album.albumArtUrl); + $('.artist').text(album.artist); + $('#release-info').text(album.releaseInfo); +} \ No newline at end of file diff --git a/scripts/song-list.js b/scripts/song-list.js index e69de29b..2910d02c 100644 --- a/scripts/song-list.js +++ b/scripts/song-list.js @@ -0,0 +1,29 @@ +{ + album.songs.forEach( (song, index) => { + song.element = $(` + + + + + song.title + song.duration + ${index + 1} + ${song.title} + ${song.duration} + + `); + + song.element.on('click', event => { + player.playPause(song); + }); + + $('#song-list').append(song.element); + }); +} + + +