title: How to handle the modal closing event in Twitter Bootstrap?
body: <p>In Twitter bootstrap, looking at the <a href="http://twitter.github.com/bootstrap/javascript.html#modals" rel="noreferrer">modals</a> documentation. I wasn't able to figure out if there is a way to listen to the close event of the modal and execute a function.</p>
  
  <p>e.g. lets take this modal as an example:</p>
  
  <pre><code>&lt;div class="modal-header"&gt;
      &lt;button type="button" class="close close_link" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
      &lt;h3&gt;Modal header&lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="modal-body"&gt;
  ...
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
      &lt;a href="#" class="btn close_link" data-dismiss="modal"&gt;Close&lt;/a&gt;   
  &lt;/div&gt;
  </code></pre>
  
  <p>The X button on top and the close button on bottom can both hide/close the modal because of <code>data-dismiss="modal"</code>. So I wonder, if I could somehow listen to that?</p>
  
  <p>Alternatively I could do it manually like this, I guess...</p>
  
  <pre><code>$("#salesitems_modal").load(url, data, function() { 
       $(this).modal('show'); 
       $(this).find(".close_link").click(modal_closing);
  });
  </code></pre>
  
  <p>What do you think?</p>