JSFiddle - React, Tailwind, and code Playground
by ChrisStanyon
HTML
<script src="https://code.jquery.com/ui/1.12.0-rc.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0-rc.1/themes/smoothness/jquery-ui.css">
<div id="dialog">Do you want to stay on this page</div>
JavaScript
$('#dialog').dialog({
title: "My Dialog",
buttons: [
{
text: "Yes",
click: function() {
$( this ).dialog( "close" );
}
},
{
text: "No",
click: function() {
$( this ).dialog( "close" );
alert("About to redirect");
//window.location="http://www.yahoo.com";
}
}
]
});