JSFiddle - React, Tailwind, and code Playground

by Rich Costello

HTML

<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.21/themes/black-tie/jquery-ui.css">
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.21/jquery-ui.min.js"></script>
<button class="open">Google</button>

<div class="unique">Are you sure you want to continue?</div>

CSS

.unique {display: none}

JavaScript

$(function() {
    $('.open').on("click", function(e) {
        var link = this;

        e.preventDefault();

        $('.unique').dialog({
            buttons: {
                "Ok": function() {
                    window.open('http://google.com');
                },
                "Cancel": function() {
                    $(this).dialog("close");
                }
            }
        });
    });
});