]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Use _bind for keydown handler
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 7 Mar 2012 17:54:38 +0000 (18:54 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 7 Mar 2012 17:54:38 +0000 (18:54 +0100)
ui/jquery.ui.accordion.js

index 5a49d781337991c91b1e3e75e4d75a30ce9000c0..f4747d168e1fe5d31fcf470290f6fd9118a72038 100644 (file)
@@ -42,6 +42,9 @@ $.widget( "ui.accordion", {
                        .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
                this._hoverable( this.headers );
                this._focusable( this.headers );
+               this._bind( this.headers, {
+                       keydown: "_keydown"
+               });
 
                this.headers.next()
                        .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
@@ -68,8 +71,6 @@ $.widget( "ui.accordion", {
 
                this.headers
                        .attr( "role", "tab" )
-                       // TODO: use _bind()
-                       .bind( "keydown.accordion", $.proxy( this, "_keydown" ) )
                        .next()
                                .attr( "role", "tabpanel" );