How to override the default confirm in javascript/jquery
<p>Ok, I'm trying to implement this plugin for a custom confirmation box, but i'm a little lost as far as the return values go. Here's the original:</p>

<pre><code>jQuery("a.confirm").click( function() { 

if ( confirm( '&lt;?php _e( 'Are you sure?' ) ?&gt;' ) ) return true; else return false;

});
</code></pre>

<p>and this what I'm trying to implement:</p>

<pre><code>$("a.confirm").click(function(){

    var elem = $(this).closest('.item');

    $.confirm({
        'title'     : 'Delete Confirmation',
        'message'   : 'You are about to delete this item. &lt;br /&gt;It cannot be restored at a later time! Continue?',
        'buttons'   : {
            'Yes'   : {
                'class' : 'blue',
                'action': function(){
                    elem.slideUp();
                }
            },
            'No'    : {
                'class' : 'gray',
                'action': function(){}  // Nothing to do in this case. You can as well omit the action property.
            }
        }
    });
</code></pre>

<p>really I just need to get the click event to recognize the second one instead of the first, and return correctly. Right now if you click, i get the original ( browser default) and i get the second afterwards. I think the "if statement" is whats throwing me off.</p>

<p>Any ideas?</p>
