diff options
| author | Jacob Thornton <[email protected]> | 2011-09-29 23:01:06 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-09-29 23:01:06 -0700 |
| commit | d2de00f1dfe6cad9272e8176dce055826caed0bb (patch) | |
| tree | 175b7c7ce3334fd1b7995277ee6fc5debc4a5d29 /docs/javascript.html | |
| parent | 28c770bf679e131cc030c3bc4a1981450f831908 (diff) | |
| parent | a0bf8b67ff4dd827f9298563616ecc519e7924c8 (diff) | |
| download | bootstrap-d2de00f1dfe6cad9272e8176dce055826caed0bb.tar.xz bootstrap-d2de00f1dfe6cad9272e8176dce055826caed0bb.zip | |
Merge branch 'kasperp-tab-event'
Diffstat (limited to 'docs/javascript.html')
| -rw-r--r-- | docs/javascript.html | 21 |
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 () { }) </script></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> |
