Here is the jquery for the code to open/close the dialog and the HTML links:
$("#security-code-link").click(function() {
$("#security-code-box").dialog({
draggable: false,
height: 500,
modal: true,
position: ["center","center"],
resizable: false,
width: 500
});
});
$("#close-security-code-link").click(function() {
$("#security-code-box").dialog("close");
});
<a id="security-code-link">Where is this?</a>
<div id="security-code-box">
<h3>Where is my security code?</h3>
<div class="center">
<img src="<?php bloginfo("template_directory"); ?>/images/security-codes.jpg" />
<br /><a id="close-security-code-link">Close this box</a>
</div>
</div>
Why is the dialog box not closing?