aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.accordion.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-08 15:08:05 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-08 15:08:05 -0400
commit04ba0a254a1d7360d8038665b22e535b2dbdb6cf (patch)
treeab5281772ab07d48eb8a8e342bdd8471e6eb224b /ui/jquery.ui.accordion.js
parentfa44e5101689bd19fc265160ac6b1a356167b922 (diff)
downloadjquery-ui-04ba0a254a1d7360d8038665b22e535b2dbdb6cf.tar.gz
jquery-ui-04ba0a254a1d7360d8038665b22e535b2dbdb6cf.zip
Accordion: Don't change corner classes on the collapsing panel's header until after the animation completes. Fixed #8224 - bug: Accordion corner style applying order.
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r--ui/jquery.ui.accordion.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index fc208e18a..fe1771bc8 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -410,9 +410,8 @@ $.widget( "ui.accordion", {
this._toggle( eventData );
// switch classes
- active
- .removeClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
- .addClass( "ui-corner-all" );
+ // corner classes on the previously active header stay after the animation
+ active.removeClass( "ui-accordion-header-active ui-state-active" );
if ( options.icons ) {
active.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.activeHeader )
@@ -518,8 +517,12 @@ $.widget( "ui.accordion", {
_toggleComplete: function( data ) {
var toHide = data.oldContent;
- // other classes are removed before the animation; this one needs to stay until completed
- toHide.removeClass( "ui-accordion-content-active" );
+ toHide
+ .removeClass( "ui-accordion-content-active" )
+ .prev()
+ .removeClass( "ui-corner-top" )
+ .addClass( "ui-corner-all" );
+
// Work around for rendering bug in IE (#5421)
if ( toHide.length ) {
toHide.parent()[0].className = toHide.parent()[0].className;