jQuery can't see appended div
Here is my code
- newId = "Author" + Math.random();
- newAuthor = $("#Author").clone();
- newAuthor.attr("id", newId);
- newAuthor.addClass("author");
- newAuthor.appendTo("#AuthorsDiv");
- alert($("#"+newId).html());
After watching the page source I can see new div with generated id and some HTML-code in it, but alert every time shows null. jQuery acts the way like there is no any created div in DOM.
Why?