From 164e46e9aa6b9e190979a5073cd081e6a7425c56 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 23 May 2012 15:57:31 -0400 Subject: Accordion: Use .show()/.hide() for initial panel visibility. --- ui/jquery.ui.accordion.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index fe1771bc8..fdb0b5f19 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; -- cgit v1.2.3