Created
November 3, 2013 23:32
-
-
Save brycelambert/7296036 to your computer and use it in GitHub Desktop.
album drop down
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listArtists: function() { | |
var i = 0, list = document.getElementById('artists-list'), artistsArray = RCApp.labels[0].artists; | |
list.innerHTML = ""; | |
for (; i < artistsArray.length;) { | |
var string = "<li><a href=\'#\' onclick=\'RCApp.displayArtistBio(\'" + artistsArray[i].name + "\')\'>" + artistsArray[i].name + "</a></li>" + RCApp.dropDownAlbums(); | |
list.innerHTML += string; | |
i += 1; | |
}; | |
list.style.display = 'block'; | |
}, | |
dropDownAlbums: function() { | |
var i = 0, list = document.getElementById('albums-dropdown'), albumsArray = RCApp.labels[0].albums, dropDownString = "<select>"; | |
for (; i < albumsArray.length;) { | |
var optionItem = "<option>" + albumsArray[i].title + "</option>"; | |
dropDownString += optionItem | |
i += 1; | |
}; | |
dropDownString += "</select>"; | |
return dropDownString; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment