aboutsummaryrefslogtreecommitdiff
path: root/docs/javascript.html
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-09-29 23:01:06 -0700
committerJacob Thornton <[email protected]>2011-09-29 23:01:06 -0700
commitd2de00f1dfe6cad9272e8176dce055826caed0bb (patch)
tree175b7c7ce3334fd1b7995277ee6fc5debc4a5d29 /docs/javascript.html
parent28c770bf679e131cc030c3bc4a1981450f831908 (diff)
parenta0bf8b67ff4dd827f9298563616ecc519e7924c8 (diff)
downloadbootstrap-d2de00f1dfe6cad9272e8176dce055826caed0bb.tar.xz
bootstrap-d2de00f1dfe6cad9272e8176dce055826caed0bb.zip
Merge branch 'kasperp-tab-event'
Diffstat (limited to 'docs/javascript.html')
-rw-r--r--docs/javascript.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/javascript.html b/docs/javascript.html
index e1d679d3f..ad4cb55dd 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -357,6 +357,27 @@ $('#my-modal').bind('hidden', function () {
})
&lt;/script&gt;</pre>
</p>
+ <h3>Events</h3>
+ <table class="zebra-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>change</td>
+ <td>This event fires on tab change. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab respectively.</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <pre class="prettyprint linenums">
+$('#.tabs').bind('change', function (e) {
+ e.target // activated tab
+ e.relatedTarget // previous tab
+})</pre>
<h3>Demo</h3>
<ul class="tabs" data-tabs="tabs" >
<li class="active"><a href="#home">Home</a></li>