aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-09-29 23:00:10 -0700
committerJacob Thornton <[email protected]>2011-09-29 23:00:10 -0700
commita0bf8b67ff4dd827f9298563616ecc519e7924c8 (patch)
tree2dd88b4990c0a3422979ad9b3be11c2fc5079c70 /docs
parentb827303511d68fdb3f913aef63f97b5f77725d68 (diff)
downloadbootstrap-a0bf8b67ff4dd827f9298563616ecc519e7924c8.tar.xz
bootstrap-a0bf8b67ff4dd827f9298563616ecc519e7924c8.zip
change event to use target and relatedTarget (which more closely resembles actual event api)
Diffstat (limited to 'docs')
-rw-r--r--docs/javascript.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/javascript.html b/docs/javascript.html
index 1f5ad1a38..956dfd0a8 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -368,14 +368,15 @@ $('#my-modal').bind('hidden', function () {
<tbody>
<tr>
<td>change</td>
- <td>This event fires on tab change. The event provides an additional parameter which holds the 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>.</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('changed', function (e, c) {
- // do something with c.from and c.to ...
+$('#.tabs').bind('change', function (e) {
+ e.target // activated tab
+ e.relatedTarget // previous tab
})</pre>
<h3>Demo</h3>
<ul class="tabs" data-tabs="tabs" >