mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-10 22:24:19 +01:00
changed event should be change event
This commit is contained in:
parent
24b05fe94a
commit
b827303511
@ -367,8 +367,8 @@ $('#my-modal').bind('hidden', function () {
|
||||
</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>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
2
js/bootstrap-tabs.js
vendored
2
js/bootstrap-tabs.js
vendored
@ -43,7 +43,7 @@
|
||||
|
||||
activate($this.parent('li'), $ul)
|
||||
activate($href, $href.parent())
|
||||
$this.trigger("changed", {from:current, to:href})
|
||||
$this.trigger("change", { from: current, to: href })
|
||||
}
|
||||
}
|
||||
|
||||
|
4
js/tests/unit/bootstrap-tabs.js
vendored
4
js/tests/unit/bootstrap-tabs.js
vendored
@ -46,7 +46,7 @@ $(function () {
|
||||
$("#qunit-runoff").empty()
|
||||
})
|
||||
|
||||
test( "should trigger changed event on activate", function () {
|
||||
test( "should trigger change event on activate", function () {
|
||||
var $tabsHTML = $('<ul class="tabs">'
|
||||
+ '<li class="active"><a href="#home">Home</a></li>'
|
||||
+ '<li><a href="#profile">Profile</a></li>'
|
||||
@ -55,7 +55,7 @@ $(function () {
|
||||
, from
|
||||
, to;
|
||||
|
||||
$tabsHTML.tabs().bind( "changed", function (e, c){
|
||||
$tabsHTML.tabs().bind( "change", function (e, c){
|
||||
from = c.from;
|
||||
to = c.to;
|
||||
changeCount++
|
||||
|
Loading…
Reference in New Issue
Block a user