title: Twitter Bootstrap Modal w/tabs default to first tab
body: <p>Using Bootstrap modal that contains tabs. The modal is called from a php generated table of gallery names.</p>
  
  <p><strong>Table Data</strong></p>
  
  <pre><code>&lt;td&gt;
  &lt;a href="#" class="galName" data-target="#myModal" data-toggle="modal" id="update_&lt;?php echo $gal['id']; ?&gt;" &gt;
  &lt;?php echo $gal['name']; ?&gt;
  &lt;/a&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>The modal opens and the first tab is selected on initial fire. If I navigate to another tab close the modal and select a different gallery the modal opens to the last tab that was open.</p>
  
  <p>How do I make sure that when the modal is opened, it always opens to the first tab?</p>
  
  <p><strong>Modal Tabs</strong></p>
  
  <pre><code>&lt;ul id="myTab" class="nav nav-tabs"&gt;
    &lt;li class="active"&gt;
         &lt;a href="#home" data-toggle="tab"&gt;Home&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=""&gt;
         &lt;a id="uploadRevision" href="#upload" data-toggle="tab"&gt;Upload Revision&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class=""&gt;
         &lt;a href="#editRev" data-toggle="tab"&gt;Edit Revision&lt;/a&gt;
     &lt;/li&gt;
   &lt;/ul&gt;
  </code></pre>
  
  <p>.galName fires an initUpdate function in effort to set first tab as default. It sets the tab but tab content is not show.</p>
  
  <pre><code>function initUpdate()
  { 
    $('#myModal a:first').tab('show');
  }
  </code></pre>
  
  <p>Thanks for the help.</p>