diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-07-15 09:51:20 +0200 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-07-15 09:51:20 +0200 |
commit | 06f721b74f94272baf5da96133e961f5600f5a90 (patch) | |
tree | 0bd2fc5ad73affcce529fc59c0ae8204d22f13fc /ui/jquery.ui.accordion.js | |
parent | 56aecac811d09232ebb22715128436f7e5ef736d (diff) | |
download | jquery-ui-06f721b74f94272baf5da96133e961f5600f5a90.tar.gz jquery-ui-06f721b74f94272baf5da96133e961f5600f5a90.zip |
Use .children() instead of .find() to manipulate accordion icons. Fixes #4645 - Accordion should only manipulate Icons that are children of ui-accordion-header
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r-- | ui/jquery.ui.accordion.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 5d31a9fec..fd6331026 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -129,7 +129,7 @@ $.widget("ui.accordion", { var o = this.options; if (o.icons) { $("<span/>").addClass("ui-icon " + o.icons.header).prependTo(this.headers); - this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected); + this.active.children(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected); this.element.addClass("ui-accordion-icons"); } }, @@ -279,7 +279,7 @@ $.widget("ui.accordion", { if (!o.collapsible) return; this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all") - .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); + .children(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); this.active.next().addClass('ui-accordion-content-active'); var toHide = this.active.next(), data = { @@ -309,10 +309,10 @@ $.widget("ui.accordion", { // switch classes this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all") - .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); + .children(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); if (!clickedIsActive) { clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top") - .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected); + .children(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected); clicked.next().addClass('ui-accordion-content-active'); } |