<!DOCTYPE html >
<html>
<head>
    <title>Dynamic JQuery Dialog</title>
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script src="https://code.jquery.com/jquery.js"></script>
    <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#def-dialog").click(function () {
                $("#MyDialog").dialog();
            });
        });
    </script>
</head>
<body>
    <input id="def-dialog" type="button" value="Default Dialog" />
    <div id="MyDialog" style="display: none;">
        This is the default dialog box</div>
</body>
</html>