title: Jquery confirmation not working
body: <p>I tried this: <a href="https://stackoverflow.com/a/12617274/4164311">https://stackoverflow.com/a/12617274/4164311</a>. The string "Are you sure about this" just appears in my browser and nothing happens when I click the button. </p>
  
  <pre><code>&lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;jQuery UI Dialog - Modal confirmation&lt;/title&gt;
  
    &lt;link rel="stylesheet" href="jquery-ui.min.css"&gt;
    &lt;script src="external/jquery/jquery.js"&gt;&lt;/script&gt;
    &lt;script src="jquery-ui.min.js"&gt;&lt;/script&gt;
  
    &lt;script&gt;
     $("#dialog").dialog({
     autoOpen: false,
     modal: true,
     buttons : {
          "Confirm" : function() {
              alert("You have confirmed!");            
          },
          "Cancel" : function() {
            $(this).dialog("close");
          }
        }
      });
  
      $("#callConfirm").on("click", function(e) {
        e.preventDefault();
        $("#dialog").dialog("open");
      });
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;button id="callConfirm"&gt;Confirm!&lt;/button&gt;
  
  &lt;div id="dialog" title="Confirmation Required"&gt;
    Are you sure about this?
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/9y3m4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9y3m4.png" alt="enter image description here"></a></p>