diff --git a/docs/javascript.html b/docs/javascript.html index a90562767e..739e2475f7 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -638,6 +638,11 @@ $('#myModal').on('hidden', function () {
Enable tabbable tabs via javascript:
$('#myTab').tab('show')+
You can also activate a specific tab (or a pseudo-selected one) on init:
++$('#myTab a[href="#profile"]').tab('show'); +$('#myTab a:last').tab('show'); +
You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab"
or data-toggle="pill"
on an element.
@@ -653,7 +658,7 @@ $('#myModal').on('hidden', function () { Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the dom.-<ul class="nav nav-tabs"> +<ul class="nav nav-tabs" id="myTab"> <li class="active"><a href="#home">Home</a></li> <li><a href="#profile">Profile</a></li> <li><a href="#messages">Messages</a></li> @@ -669,7 +674,7 @@ $('#myModal').on('hidden', function () { <script> $(function () { - $('.tabs a:last').tab('show') + $('#myTab a:last').tab('show') }) </script>Events