title: How to get the modal dialog instance through the Bootstrap programmatic API?
body: <p>The scenario I'm trying to solve is to disable that the escape-button closes the dialog <strong>AFTER</strong> the modal has been instaniated (the dialog is set to a loading state). So in other words after I have instaniated my modal like this: </p>
  
  <pre><code>(this.$el).modal("show");
  </code></pre>
  
  <p>The user presses a submit button and the dialog is set to a loading state and I want to disable the escape-button since the user should not be able to close the dialog in this state.</p>
  
  <p>I have tried this: </p>
  
  <pre><code>(this.$el).modal({ keyboard: false });
  </code></pre>
  
  <p>But it does not work, it seems that Bootstrap only reads those options when it instaniates the modal dialog... </p>
  
  <p>So my question is if it is possible to get a hold of the actual bootstrap modal-instance to be able to change the options-object? According to the documentation it should be possible (or have I misunderstood the docs?), but I cannot figure out how. </p>
  
  <p>Here is what it says in the documentation (<a href="http://getbootstrap.com/javascript/" rel="nofollow">http://getbootstrap.com/javascript/</a>): 
  <em>If you'd like to get a particular plugin instance, retrieve it directly from an element:</em> </p>
  
  <p><code>$('[rel="popover"]').data('popover').</code></p>
  
  <p>Any ideas?</p>