JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css">
<button id="open_dialog_js">open dialog js</button>
<button id="open_dialog_html">open dialog html</button>
<div style="display:none">
<div id="dialog_one" title="first dialog">
dialog one
</div>
<div id="dialog_two" title="second dialog">
dialog two
</div>
<div id="dialog_three" title="third dialog">
dialog three
</div>
</div>
JavaScript
$(function(){
$("#open_dialog_js").bind("click", function() {
$("<div />").appendTo("body").html("dialog one")
.dialog({
title: "first dialog",
modal: true,
close: function() {
$(this).remove();
},
buttons: {
"open new": function() {
$("<div />").appendTo("body").html("dialog two")
.dialog({
title: "second dialog",
modal: true,
close: function() {
$(this).remove();
},
buttons: {
"open new": function() {
$("<div />").appendTo("body").html("dialog three")
.dialog({
title: "third dialog",
modal: true,
close: function() {
$(this).remove();
}
});
}
}
});
}
}
});
});
$("#open_dialog_html").bind("click", function() {
$("#dialog_one").dialog({
modal: true,
buttons: {
"new dialog": function() {
$("#dialog_two").dialog({
modal: true,
buttons: {
"new dialog":...