// ensure old event handlers are unbound
element.find( ".ui-accordion-header" ).eq( 1 ).trigger( "custom1" );
+ element.find( ".ui-accordion-header" ).eq( 1 ).trigger( "custom2" );
equal( element.accordion( "option", "active" ), 2 );
accordion_state( element, 0, 0, 1 );
if ( key === "event" ) {
if ( this.options.event ) {
- // TODO: this is incorrect for multiple events (see _setupEvents)
- this.headers.unbind( this.options.event + ".accordion", this._eventHandler );
+ this.headers.unbind( this.options.event.split( " " ).join( ".accordion " ) + ".accordion", this._eventHandler );
}
this._setupEvents( value );
}