mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-27 15:19:52 +02:00
changed event should be change event
This commit is contained in:
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 })
|
||||
}
|
||||
}
|
||||
|
||||
|
10
js/tests/unit/bootstrap-tabs.js
vendored
10
js/tests/unit/bootstrap-tabs.js
vendored
@@ -45,8 +45,8 @@ $(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>'
|
||||
@@ -54,13 +54,13 @@ $(function () {
|
||||
, changeCount = 0
|
||||
, from
|
||||
, to;
|
||||
|
||||
$tabsHTML.tabs().bind( "changed", function (e, c){
|
||||
|
||||
$tabsHTML.tabs().bind( "change", function (e, c){
|
||||
from = c.from;
|
||||
to = c.to;
|
||||
changeCount++
|
||||
})
|
||||
|
||||
|
||||
$tabsHTML.tabs().find('a').last().click()
|
||||
|
||||
equals(from, "#home")
|
||||
|
Reference in New Issue
Block a user