From 956697bfca1b386ae20eb27ccfd8c1df3234f1f2 Mon Sep 17 00:00:00 2001 From: Xavi Date: Sun, 19 Dec 2010 16:52:22 -0500 Subject: All: Use .toggleClass() instead of conditionally using .addClass() and .removeClass(). Fixes #6764 - Use toggleClass instead of [ bool ? 'addClass' : 'removeClass' ]. --- ui/jquery.ui.accordion.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/jquery.ui.accordion.js') 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 ); } }, -- cgit v1.2.3