]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
changed event should be change event
authorJacob Thornton <jacobthornton@gmail.com>
Fri, 30 Sep 2011 05:21:55 +0000 (22:21 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Fri, 30 Sep 2011 05:21:55 +0000 (22:21 -0700)
docs/javascript.html
js/bootstrap-tabs.js
js/tests/unit/bootstrap-tabs.js

index b1816229e743077d4dded57295f6fced10d25ac8..1f5ad1a38fe391c5edd862940510fba23b79e57d 100644 (file)
@@ -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>
index 563d88f0130ce29b665d86cd788e95eb7e9f5bde..938a54cc04b39deecfc39520bc8860825eba55aa 100644 (file)
@@ -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 })
     }
   }
 
index 0b92b94db07b94e7e5636dcd28867d7a8d0ccbbb..3c2610c514ae238269e93e22a4369f0d7102c717 100644 (file)
@@ -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")