I am trying to append some text to the dynamically created div. I am doing this inside the .each() function. The problem the text is not getting appended. Can someone please help me with this. Here it is what I am trying to do
$('<div class="window" id="window'+i+'" />')
.append($('<p id="country'+i+'">').text($(this).find('COUNTRY').text()))
.appendTo('body');
var j = 0;
$(this).find('TO').each(function(){
var $name = $(this).text();
alert("@@@@@@@@@@@@@@@@@@@@::::"+$name);
j +=1;
$('<#id="window'+i+'" />').append($('<p id="to'+j+'">Test</p>'));
});
Please help me by letting me know where I am going wrong with this
What is this element ?
Would you mean:
?