Skip to content
Permalink
Browse files

Accordion: Fixed key handling.

  • Loading branch information...
scottgonzalez committed Jul 13, 2011
1 parent 927857c commit 06676f46966d43b6ba169363d751074645c8c303
Showing with 7 additions and 5 deletions.
  1. +7 −5 ui/jquery.ui.accordion.js
@@ -162,17 +162,20 @@ $.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
if ( key === "collapsible" && !value && this.options.active === false ) {
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" ) );

0 comments on commit 06676f4

Please sign in to comment.
You can’t perform that action at this time.