title: Implement jQuery confirmation modal in a form submit?
body: <p>I am using jQuery modal confirmation like this:</p>
  
  <pre><code>$(function() {
      $( "#dialog-confirm" ).dialog({
        resizable: false,
        height:190,
        width: 330,
        modal: true,
        buttons: {
          "Yes": function() {
            $( this ).dialog( "close" );
          },
          No: function() {
            $( this ).dialog( "close" );
          }
        }
      });
    });
  
    &lt;div id="dialog-confirm" title="Genalytics"&gt;
    &lt;p&gt;&lt;span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"&gt;&lt;/span&gt;Are you sure want to unshare?&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have a input button in a form like this:</p>
  
  <pre><code>&lt;input type="submit" value="Unshare" name="unshare" /&gt;
  </code></pre>
  
  <p>I want to popup dialog box when user clicks on the button. How can I do that?</p>