JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<a href="#" id="open">Open</a>
<div id="window-1">Hello 1</div>
<div id="window-2">Hello 2</div>
JavaScript
$("#window-1").dialog({
autoOpen: false,
close : function() {
$("#window-2").dialog("close");
}
});
$("#window-2").dialog({
autoOpen: false
});
$("body").on("click", "#open", function() {
$("#window-1").dialog("open").html("I'm the new content<br/><a href=\"#\" id=\"open-2\">Open 2nd window</a>");
});
$("body").on("click", "#open-2", function() {
$("#window-2").dialog("open").html("I'm the 2nd window");
});