 <p>Please see this example that I made for you: <a href="http://jsfiddle.net/972ak/" rel="nofollow">http://jsfiddle.net/972ak/</a></p> <pre><code>$('form .close').click(function(event) { Boxy.confirm("Are you sure ?", function() { alert('ok'); }); return false; }); </code></pre> <p>Boxy documentation says:</p> <p>Boxy.confirm(message, callback, options) Displays a modal, non-closeable dialog displaying a message with OK and Cancel buttons. Callback will only be fired if user selects OK.</p> <p><a href="http://onehackoranother.com/projects/jquery/boxy/" rel="nofollow">http://onehackoranother.com/projects/jquery/boxy/</a></p>