I have an array of div names (with no hash), and i'm using the following jQuery code do do something with them:
for(dayList in dayLists) {
dayListID = "#" + dayList;
$(dayListID).append("test");
}
Unfortunately, it does not work. I can see in the console that dayListID
is an "HTMLDivElement", rather than the string that JQ is expecting. How can I join a hash and the div name while keeping the result as a string? Thanks!