How do I add elements to an element that was added within an each? Here's an example:
$.each(data.id, function(i, item) {
$( ".lado" ).prepend("<div id='tes'>" + data.id + "</div>");
if (data.id == i) {
$( "#tes" ).append("<div>" + data.id + "</div>");
}
});
The prepend works fine but apparently the append does not work because I do not find the id added in the prepend.