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?
The dot is not valid in the ID.
#popup.dialogsearches for<div id='popup' class='dialog'>. You should replace it with a dash, like