Submiting a form with jQuery Confirm Dialog Replacement
<p>I'm using this <a href="http://tutorialzine.com/2010/12/better-confirm-box-jquery-css3/" rel="nofollow">jQuery Confirm Dialog Replacement</a> script for regular text links. But I would like to use it also when submiting a form and I'm having problems.</p>

<p>HTML:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;A jQuery Confirm Dialog Replacement with CSS3 | Tutorialzine Demo&lt;/title&gt;

&lt;link href='http://fonts.googleapis.com/css?family=Cuprum&amp;amp;subset=latin'       rel='stylesheet' type='text/css'&gt;
&lt;link rel="stylesheet" type="text/css" href="jquery.confirm/jquery.confirm.css" /&gt;

&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="jquery.confirm/jquery.confirm.js"&gt;&lt;/script&gt;
&lt;script src="js/script.js"&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;


    &lt;form action="test.php" method="post" id="reg"&gt;
        &lt;input type="submit" name="submit" class="confirm" value="Submit" /&gt;
    &lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>script.js:</p>

<pre><code>$(document).ready(function(){

$('.confirm').click(function(e){
    e.preventDefault();


    $.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(){
                    $("#reg").submit();
                }
            },
            'No'    : {
                'class' : 'gray',
                'action': function(){}  
            }
        }
    });

});

});
</code></pre>

<p>Why is this not working? Thank you for your answers!</p>
