JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css">
<input type="button" value="Destroy & Recreate" id="button" />
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
JavaScript
$(document).ready(function () {
$("#dialog").dialog();
$("#button").click(function () {
$("#dialog").dialog("destroy");
$("#dialog").dialog();
});
});