mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-23 05:33:02 +02:00
Merge branch 'kasperp-tab-event'
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user