From: Jörn Zaefferer Date: Wed, 7 Mar 2012 17:54:38 +0000 (+0100) Subject: Accordion: Use _bind for keydown handler X-Git-Tag: 1.9m7~13^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d68f1339975e5c3f725c8860870d402cbcfec27;p=jquery-ui.git Accordion: Use _bind for keydown handler --- diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 5a49d7813..f4747d168 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -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" );