I want to select recently created element doing something like this:
$("body").append("<div id='popup.dialog'></div>");
dialogDiv = $("#popup.dialog");
But after execution of this dialogDiv contains nothing. So is there're way to select newly createn element?