title: How to implement "confirmation" dialog in Jquery UI dialog?
body: <p>I am try to use JQuery UI Dialog to replace the ugly <code>javascript:alert()</code> box.
  In my scenario, I have a list of items, and next to each individual of them, I would have a "delete" button for each of them. 
  the psuedo html setup will be something follows:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;ITEM &lt;a href="url/to/remove"&gt; &lt;span&gt;$itemId&lt;/span&gt;
      &lt;li&gt;ITEM &lt;a href="url/to/remove"&gt;&lt;span&gt;$itemId&lt;/span&gt;
      &lt;li&gt;ITEM &lt;a href="url/to/remove"&gt;&lt;span&gt;$itemId&lt;/span&gt;
  &lt;/ul&gt;
  
  &lt;div id="confirmDialog"&gt;Are you sure?&lt;/div&gt;
  </code></pre>
  
  <p>In JQ part, on document ready, I would first setup the div to be a modal dialog with necessary button, and set those "a" to be firing to confirmation before to remove, like:</p>
  
  <pre><code>$("ul li a").click(function() {
    // Show the dialog    
    return false; // to prevent the browser actually following the links!
  }
  </code></pre>
  
  <p>OK, here's the problem. during the init time, the dialog will have no idea who (item) will fire it up, and also the item id (!). How can I setup the behavior of those confirmation buttons in order to, if the user still choose YES, it will follow the link to remove it?</p>