title: twitter bootstrap tab set input focus when tab click
body: <p>I'm using this <a href="http://getbootstrap.com/javascript/#tabs" rel="nofollow">http://getbootstrap.com/javascript/#tabs</a> to create tabs in my forms. <br />
  What i need is to set focus on first <code>input="text"</code> that is displayed. <br /> <br />
  I was unable to find it in documentation or elsewhere.</p>
  
  <pre><code>&lt;div class="tabs"&gt;
  &lt;ul class="nav nav-tabs"&gt;
     &lt;li class="active"&gt;&lt;a data-toggle="tab" href="#login1"&gt;
        &lt;span class="icon-key"&gt;&lt;/span&gt;Login&lt;/a&gt;
     &lt;/li&gt;
     &lt;li class=""&gt;
        &lt;a data-toggle="tab" href="#register1"&gt;&lt;span class="icon-user"&gt;&lt;/span&gt;Register
        &lt;/a&gt;   
     &lt;/li&gt;
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
     &lt;div id="login1" class="tab-pane active"&gt;
        &lt;input type="text"&gt; &lt;!-- focus when tab clicked --&gt;
     &lt;/div&gt;
     &lt;div id="register1" class="tab-pane"&gt;
        &lt;input type="text"&gt; &lt;!-- focus when tab clicked --&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>