JSFiddle - React, Tailwind, and code Playground

by chridam

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-lightness/jquery-ui.css">
<div class="openDialogLink">Click here</div>

JavaScript

$(".openDialogLink").live("click", function(e) {
    e.preventDefault();
    $("<div></div>").addClass("dialogBoxDiv").appendTo("body").dialog({
        modal: true,
        draggable: true,
        overlay: {
            backgroundColor: "#000000",
            opacity: 0.5
        },
        title: $(this).attr("DialogTitle"),
        show: "puff",
        hide: "puff",
        closeOnEscape: true,
        close: function() {
            $(this).remove();
        }
    }).load(this.href);
});

$(".close").live("click", function(e) {
    e.preventDefault();
    $(this).closest(".dialog").dialog("close");
});