| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> |
|---|
| 4 | <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"></script> |
|---|
| 5 | <script src="ckeditor/ckeditor.js" type="text/javascript"></script> |
|---|
| 6 | </head> |
|---|
| 7 | <body> |
|---|
| 8 | |
|---|
| 9 | <input type="button" id="openDialog" value="Open dialog" /> |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | <script type="text/javascript"> |
|---|
| 13 | |
|---|
| 14 | $('#openDialog').bind('click', function() { |
|---|
| 15 | var dlgDiv = $("<div></div>"); |
|---|
| 16 | dlgDiv.appendTo("body"); |
|---|
| 17 | |
|---|
| 18 | dlgDiv.dialog({ |
|---|
| 19 | title: "This won't init correctly with webkit & Firefox", |
|---|
| 20 | autoOpen: false, |
|---|
| 21 | show: "blind", |
|---|
| 22 | hide: "fade", |
|---|
| 23 | closeOnEscape: true, |
|---|
| 24 | width: 800, |
|---|
| 25 | |
|---|
| 26 | buttons: [{ |
|---|
| 27 | text: "Close", |
|---|
| 28 | click: function () { |
|---|
| 29 | dlgDiv.dialog("close"); |
|---|
| 30 | } |
|---|
| 31 | }], |
|---|
| 32 | close: function() { |
|---|
| 33 | dlgDiv.dialog('destroy'); |
|---|
| 34 | dlgDiv.remove(); |
|---|
| 35 | } |
|---|
| 36 | }); |
|---|
| 37 | |
|---|
| 38 | dlgDiv.load('dialog.html', function () { |
|---|
| 39 | dlgDiv.dialog("open"); |
|---|
| 40 | }); |
|---|
| 41 | }); |
|---|
| 42 | |
|---|
| 43 | </script> |
|---|
| 44 | |
|---|
| 45 | </body> |
|---|
| 46 | </html> |
|---|