aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.accordion.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r--ui/jquery.ui.accordion.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index fe1771bc8..f713d25b8 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -63,7 +63,8 @@ $.widget( "ui.accordion", {
this._focusable( this.headers );
this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
+ .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
+ .hide();
// don't allow collapsible: false and active: false
if ( !options.collapsible && options.active === false ) {
@@ -76,7 +77,9 @@ $.widget( "ui.accordion", {
this.active = this._findActive( options.active )
.addClass( "ui-accordion-header-active ui-state-active" )
.toggleClass( "ui-corner-all ui-corner-top" );
- this.active.next().addClass( "ui-accordion-content-active" );
+ this.active.next()
+ .addClass( "ui-accordion-content-active" )
+ .show();
this._createIcons();
this.originalHeight = this.element[0].style.height;
@@ -290,10 +293,9 @@ $.widget( "ui.accordion", {
},
refresh: function() {
- var heightStyle = this.options.heightStyle,
- parent = this.element.parent(),
- maxHeight,
- overflow;
+ var maxHeight, overflow,
+ heightStyle = this.options.heightStyle,
+ parent = this.element.parent();
this.element.css( "height", this.originalHeight );