title: Jquery dialog modal not closing
body: <p>I have a dialog modal that is not closing when "save" or "cancel" are clicked.  I have compared to <a href="http://jqueryui.com/demos/dialog/" rel="noreferrer">jQuery UI's official demo page</a> and can't seem to find why this would not be working.</p>
  
  <p>Here is what I have: </p>
  
  <pre><code> $(function () {
              $("#DetailsWindow").dialog({
                  autoOpen: false,
                  resizable: false,
                  height: 500,
                  width: 600,
                  modal: true,
                  title: 'Appointment Details',
                  buttons: {
                      "Save": function () {
                          $(this).dialog("close");
                      },
                      "Cancel": function () {
                          $(this).dialog("close");
                      }
                  }
              });
  
              $('button').click(function () {
                  $("#DetailsWindow").dialog("open");
              });
          });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code> &lt;button&gt;A button&lt;/button&gt;
          &lt;div id="DetailsWindow"&gt;
              &lt;h3&gt;Title&lt;/h3&gt;
              &lt;span&gt;Some Text&lt;/span&gt;
          &lt;/div&gt;
  </code></pre>