I have created a div using jquery that i want to make a dialog. I want to append another div in that dialog before opening it. How can i do that??
Asked
Active
Viewed 1,523 times
1
-
Dup: http://stackoverflow.com/questions/1377247/create-dialog-without-id-in-jquery – Crescent Fresh Sep 04 '09 at 13:33
2 Answers
2
You could add a DOM Object into a div with:
$("div#dialog").append("<div></div>");

mknjc
- 1,577
- 1
- 9
- 9
0
create new div and apend old div to it to old div
var newDiv = $(document.createElement('div')); //Note 1
$("#ID_OF_OLD_DIV").appendTo($(newDiv));
$(newDiv).dialog();//or what ever you are using
Nte 1: from this answer

Community
- 1
- 1

TheVillageIdiot
- 40,053
- 20
- 133
- 188