title: Twitter bootstrap modals & Ajax?
body: <p>I am using <a href="http://twitter.github.com/bootstrap/javascript.html#modals">Twitter bootstrap modals</a> To load data from a table.</p>
  
  <p>Here is my HTML code. </p>
  
  <pre><code>&lt;tr&gt;
  ....
  &lt;td&gt; &lt;a href="http://google.com"&gt;Text&lt;/a&gt; &lt;/td&gt;
  ....
  &lt;/tr&gt;
  </code></pre>
  
  <p>and this is the Modal div at the end of the page like so</p>
  
  <pre><code>&lt;div id="modal"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>What I'm trying to achieve is by clicking the link inside the cell I want to contents of the modal to be updated &amp; then after it finishes updating to open the modal automatically. Here is what I tried.</p>
  
  <pre><code>$('td').on('click','a',function(){
      var href = $(this).attr('href');
  
          $('#modal').load(href,function(){
              $(this).modal({
                  keyboard:true,
                  backdrop:true
                });
          });
  </code></pre>
  
  <p>It doesn't give me any errors &amp; actually the HTML gets loaded successfully in the Modal div but it doesn't load the modal after updating the HTML it needs another "Click"?! &amp; I don't know why?</p>