Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  Check me!<input type="checkbox" id="cb" />
</body>
</html>
 
$("#cb").click(function () {
        var dlg = $('<div>');
            dlg.html("MY WINDOW").dialog({
                    closeOnEscape: false,
                    autoOpen: true,
                    title: "TITLE",
                    modal: true,
                    buttons: {
                    Ok: function() {
                       dlg.dialog("close");
                        return true;
                    }},
                    resizable: false,
                    show: {
                        effect: 'fade',
                        duration: 300
                    },
                    hide: {
                        effect: 'fade',
                        direction: 'up',
                        duration: 100
                    },
                    width: 500,
                    open: function (event, ui) {
                    }
                });
        
         });
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers