diff options
author | Xavi <xavi.rmz@gmail.com> | 2010-12-19 16:52:22 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-12-19 16:52:22 -0500 |
commit | 956697bfca1b386ae20eb27ccfd8c1df3234f1f2 (patch) | |
tree | f246a4e7ea861a3bbc1939f758489e9febfbdb9d /ui/jquery.ui.accordion.js | |
parent | d6edba5a89ab5e84044666bb9d50a4663c1412c8 (diff) | |
download | jquery-ui-956697bfca1b386ae20eb27ccfd8c1df3234f1f2.tar.gz jquery-ui-956697bfca1b386ae20eb27ccfd8c1df3234f1f2.zip |
All: Use .toggleClass() instead of conditionally using .addClass() and .removeClass(). Fixes #6764 - Use toggleClass instead of [ bool ? 'addClass' : 'removeClass' ].
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r-- | ui/jquery.ui.accordion.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 76be0095f..955030ccc 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -187,8 +187,7 @@ $.widget( "ui.accordion", { // so we need to add the disabled class to the headers and panels if ( key == "disabled" ) { this.headers.add(this.headers.next()) - [ value ? "addClass" : "removeClass" ]( - "ui-accordion-disabled ui-state-disabled" ); + .toggleClass( "ui-accordion-disabled ui-state-disabled", !!value ); } }, |