$('#test-list').append($(document.createElement("li")).attr({id: data.msg}));
$('#'+data.msg).append($(document.createElement("img")).attr({src: "kep.php?kep=upload/"+data.msg+"&w=180;&h=150;"}));
Does not work, because of the $('#'+data.msg).
param. I don't know how to fix it. I want to make a sub-element to the #test-list and name it to the value of data.msg variable.