diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-07-12 20:50:24 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-07-12 20:50:43 -0400 |
commit | 06676f46966d43b6ba169363d751074645c8c303 (patch) | |
tree | 23a85d1f722535ff052984c255359c8df598eaff /ui | |
parent | 927857ce84b11b081d0c983e5fa561bc2264bd19 (diff) | |
download | jquery-ui-06676f46966d43b6ba169363d751074645c8c303.tar.gz jquery-ui-06676f46966d43b6ba169363d751074645c8c303.zip |
Accordion: Fixed key handling.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.accordion.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 7602ae9bc..acd19c981 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -162,6 +162,13 @@ $.widget( "ui.accordion", { return; } + if ( key === "event" ) { + if ( this.options.event ) { + this.headers.unbind( this.options.event + ".accordion", this._eventHandler ); + } + this._setupEvents( value ); + } + this._super( "_setOption", key, value ); // setting collapsible: false while collapsed; open first panel @@ -169,10 +176,6 @@ $.widget( "ui.accordion", { this._activate( 0 ); } - if ( key === "event" ) { - this._setupEvents( value ); - } - if ( key === "icons" ) { this._destroyIcons(); if ( value ) { @@ -294,7 +297,6 @@ $.widget( "ui.accordion", { }, _setupEvents: function( event ) { - this.headers.unbind( ".accordion" ); if ( event ) { this.headers.bind( event.split( " " ).join( ".accordion " ) + ".accordion", $.proxy( this, "_eventHandler" ) ); |