aboutsummaryrefslogtreecommitdiff
path: root/docs/javascript.html
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-09-29 22:18:08 -0700
committerJacob Thornton <[email protected]>2011-09-29 22:18:08 -0700
commit24b05fe94a46a5b21a122a08b967eeb3ee6e6a86 (patch)
tree863b6f2d9b7a1ca2461288c2cc70132ee0641a70 /docs/javascript.html
parent68605bdd51760a929cc661607f06f479c53b0bee (diff)
parente16de59260c860af67748a484631ae3de56fc244 (diff)
downloadbootstrap-24b05fe94a46a5b21a122a08b967eeb3ee6e6a86.tar.xz
bootstrap-24b05fe94a46a5b21a122a08b967eeb3ee6e6a86.zip
Merge branch 'tab-event' of https://github.com/kasperp/bootstrap into kasperp-tab-event
Diffstat (limited to 'docs/javascript.html')
-rw-r--r--docs/javascript.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/javascript.html b/docs/javascript.html
index bb8864d46..b1816229e 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -357,6 +357,26 @@ $('#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>changed</td>
+ <td>This event fires when the tabs are changed. The event provides an additional parameter which holds id of the previous tab and the id of the new current tab. This information is stored in an object with two properties called from and to, e.g. <code>{to: '#home', from: '#profile'}</code>. This event allows you load and change content of the tabs on request.</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <pre class="prettyprint linenums">
+$('#.tabs').bind('changed', function (e, c) {
+ // do something with c.from and c.to ...
+})</pre>
<h3>Demo</h3>
<ul class="tabs" data-tabs="tabs" >
<li class="active"><a href="#home">Home</a></li>