I am dynamically creating div elements with unique ids and adding span elements with specific CSS properties.
$(".main").append("<div class=largeBox id=" + counter + "</div>");
$(".largeBox").append("<span class=mainTitle></span>");
However, I am facing an issue when trying to load text into these boxes as the selection doesn't seem to work. Can anyone help me figure out why?
var id = "#" + counter;
$(id + " .mainTitle").text(title);