diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-01-31 12:48:00 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-01-31 12:48:00 -0500 |
commit | 5a55d68eca60b52cbd1ae1ab48a6c9b1f8817ef1 (patch) | |
tree | 63643e9dfc1f265051ff65d441ce943121864398 /ui/jquery.ui.accordion.js | |
parent | 3919256abd7b91dcc8437c245f98d623103f97e0 (diff) | |
download | jquery-ui-5a55d68eca60b52cbd1ae1ab48a6c9b1f8817ef1.tar.gz jquery-ui-5a55d68eca60b52cbd1ae1ab48a6c9b1f8817ef1.zip |
Accordion: Moved the ui-accordion-icons class to the headers to properly style nested accordions with varying settings of icons and no icons. Fixes #7880 - Nested accordion.
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r-- | ui/jquery.ui.accordion.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 97549cb10..6c486c7b1 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -119,13 +119,15 @@ $.widget( "ui.accordion", { this.active.children( ".ui-accordion-header-icon" ) .removeClass( icons.header ) .addClass( icons.activeHeader ); - this.element.addClass( "ui-accordion-icons" ); + this.headers.addClass( "ui-accordion-icons" ); } }, _destroyIcons: function() { - this.headers.children( ".ui-accordion-header-icon" ).remove(); - this.element.removeClass( "ui-accordion-icons" ); + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); }, _destroy: function() { |