title: Bootbox Confirm Dialog problems
body: <p>Unfortunately, the doc Bootbox ( <a href="http://paynedigital.com/2011/11/bootbox-js-alert-confirm-dialogs-for-twitter-bootstrap" rel="noreferrer">http://paynedigital.com/2011/11/bootbox-js-alert-confirm-dialogs-for-twitter-bootstrap</a> ) not teach how to call the confirm dialog. As it is in the doc window always appears when the page is loaded, what is wrong, should appear when called by clicking on a delete button.
  This is the code that tried unsuccessfully.</p>
  
  <pre><code>// show "false" does not work, the confirm window is showing when page is loaded.
  $(function () {
  bootbox.confirm("Confirm delete?", "No", "Yes", function(result) {
  show: false
  });     
  });
  
  // need show the confirm window when the user click in a button, how to call the confirm window?
  
  &lt;td&gt;&lt;a class="icon-trash" onclick="bootbox.confirm();" href="{% url 'del_setor' setor.id %}" title="Delete"&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>How do I set this bootbox to appear only when the delete button is clicked?
  Thanks!</p>
  
  <p>EDIT -SOLUTION:</p>
  
  <pre><code>$(function () {
  $("a#confirm").click(function(e) {
      e.preventDefault();
      var location = $(this).attr('href');
      bootbox.confirm("Confirm exclusion?", "No", "Yes", function(confirmed) {
          if(confirmed) {
          window.location.replace(location);
          }
      });
  });     
  });
  </code></pre>
  
  <p>Now, the deletion works when i click in "yes".
  I asked the developers of the plugin to put the full sample in the doc, so users do not need to create posts about how to remove the object when "yes" is clicked.
  Regards.</p>