Confirmation before deleting (jquery)
<p>I would like to show a simple confirmation dialog box show before running a delete function.</p>

<p>Here is what I have so far</p>

<p>HTML:</p>

<pre><code>&lt;!-- Delete Confirmation Dialog Box --&gt;

&lt;div id="confirm" style="display:none;"&gt;
 &lt;div class="message"&gt;Are you sure you want to delete?&lt;/div&gt;
    &lt;div class="buttons"&gt;
        &lt;div class="cancel"&gt;No&lt;/div&gt;&lt;div class="accept"&gt;Yes&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;!-- Delete Button/s --&gt;

&lt;a href="javascript:void(0);" onclick="delete("1")"&gt;&lt;img src="images/48x_delete.png" alt="48x_delete" width="24" height="24"/&gt;&lt;/a&gt;
&lt;a href="javascript:void(0);" onclick="delete("2")"&gt;&lt;img src="images/48x_delete.png" alt="48x_delete" width="24" height="24"/&gt;&lt;/a&gt;

...etc...
</code></pre>

<p>jQuery:</p>

<pre><code>function delete(id) { 

    fileName= 'update_db.php';

    $('#response').html("&lt;img src='images/ajax-loader.gif' border=0&gt; Please Wait");
    $.post(fileName,{postvar:1, id:id, action:'delete'}, function(res) { showStatus(res);});

}
</code></pre>

<p>Could someone help me to modify my code to show the dialog box and confirm the delete?? Thanks!!!</p>
