I've been trying to dynamically append a div to inside multiple other divs:
SoundCloudAPI.renderTracks = function createCards(){
var card = document.createElement('div');
card.classList.add("card");
var searchResults = document.querySelector('.js-search-results');
searchResults.appendChild(card);
var imageDiv = document.createElement('div');
imageDiv.classList.add("image");
var imageResults = document.querySelector('.card');
imageResults.appendChild(imageDiv);
}
however, it only appends to the first "card" div in my body.
What's the problem here?