]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Merge branch 'Synchro-master' into 2.0.3-wip
authorMark Otto <markotto@twitter.com>
Fri, 23 Mar 2012 00:10:16 +0000 (17:10 -0700)
committerMark Otto <markotto@twitter.com>
Fri, 23 Mar 2012 00:10:16 +0000 (17:10 -0700)
Conflicts:
docs/assets/bootstrap.zip

1  2 
docs/assets/bootstrap.zip
docs/javascript.html

index 49ccf75ec0d234e4eff70db5fcf50f17c006d5da,80e5096dfb73c659066e2c527bd0aff94b93cc7d..693969290b7dda5a5f316d1647e7773669d1ca4a
Binary files differ
index a90562767e32186d12605d2cbbf83a552348a128,39cb5c5a5ee7d96ccd81975578763ccc28731db4..f0382bf49db75c5c813fd0d633b51f82af0d0f9b
@@@ -636,10 -636,21 +636,21 @@@ $('#myModal').on('hidden', function () 
            </div>
            <hr>
            <h2>Using bootstrap-tab.js</h2>
-           <p>Enable tabbable tabs via javascript:</p>
-           <pre class="prettyprint linenums">$('#myTab').tab('show')</pre>
+           <p>Enable tabbable tabs via javascript (each tab needs to be activated individually):</p>
+           <pre class="prettyprint linenums">
+ $('#myTab a').click(function (e) {
+   e.preventDefault();
+   $(this).tab('show');
+ })</pre>
+           <p>You can activate individual tabs in several ways:</p>
+ <pre class="prettyprint linenums">
 -$('#myTab a[href="#profile"]').tab('show'); //Select tab by name
 -$('#myTab a:first').tab('show'); //Select first tab
 -$('#myTab a:last').tab('show'); //Select last tab
 -$('#myTab li:eq(2) a').tab('show'); //Select third tab (0-indexed)
++$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
++$('#myTab a:first').tab('show'); // Select first tab
++$('#myTab a:last').tab('show'); // Select last tab
++$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
+ </pre>
            <h3>Markup</h3>
-           <p>You can activate a tab or pill navigation without writing any javascript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element.</p>
+           <p>You can activate a tab or pill navigation without writing any javascript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the bootstrap tab styling.</p>
  <pre class="prettyprint linenums">
  &lt;ul class="nav nav-tabs"&gt;
    &lt;li&gt;&lt;a href="#home" data-toggle="tab"&gt;Home&lt;/a&gt;&lt;/li&gt;
            <h3>Methods</h3>
            <h4>$().tab</h4>
            <p>
--            Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the dom.
++            Activates a tab element and content container. Tab should have either a <code>data-target</code> or an <code>href</code> targeting a container node in the DOM.
            </p>
  <pre class="prettyprint linenums">
- &lt;ul class="nav nav-tabs"&gt;
+ &lt;ul class="nav nav-tabs" id="myTab"&gt;
    &lt;li class="active"&gt;&lt;a href="#home"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#messages"&gt;Messages&lt;/a&gt;&lt;/li&gt;
  
  &lt;script&gt;
    $(function () {
-     $('.tabs a:last').tab('show')
 -    $('#myTab a:last').tab('show')
++    $('#myTab a:last').tab('show');
    })
  &lt;/script&gt;</pre>
            <h3>Events</h3>