diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2015-09-21 12:29:46 +0200 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-09-25 13:46:41 -0400 |
commit | 874b4a0316b262edaf184a9ddbef539bb6496082 (patch) | |
tree | 225296308fe67f2b60b95eba44fb20aa665c70ca /ui | |
parent | 7dde5c9d75148cdca7cf86ff0c6e310fdc5a4054 (diff) | |
download | jquery-ui-874b4a0316b262edaf184a9ddbef539bb6496082.tar.gz jquery-ui-874b4a0316b262edaf184a9ddbef539bb6496082.zip |
Accordion: Handle disabled option on create, through _setOptionDisabled
Ref #9151
Ref gh-1599
Diffstat (limited to 'ui')
-rw-r--r-- | ui/widgets/accordion.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ui/widgets/accordion.js b/ui/widgets/accordion.js index 78fea52b1..360ac1700 100644 --- a/ui/widgets/accordion.js +++ b/ui/widgets/accordion.js @@ -174,17 +174,19 @@ return $.widget( "ui.accordion", { this._createIcons(); } } + }, + + _setOptionDisabled: function( value ) { + this._super( value ); + + this.element.attr( "aria-disabled", value ); // Support: IE8 Only // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE // so we need to add the disabled class to the headers and panels - if ( key === "disabled" ) { - this.element.attr( "aria-disabled", value ); - - this._toggleClass( null, "ui-state-disabled", !!value ); - this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", - !!value ); - } + this._toggleClass( null, "ui-state-disabled", !!value ); + this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", + !!value ); }, _keydown: function( event ) { |