aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.accordion.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-23 15:57:31 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-23 15:57:48 -0400
commit164e46e9aa6b9e190979a5073cd081e6a7425c56 (patch)
tree9d6972b04fa79d83848774e1a41c4e4a1f7ca86a /ui/jquery.ui.accordion.js
parent474912313ad82f31092bc15194eb91e17647592e (diff)
downloadjquery-ui-164e46e9aa6b9e190979a5073cd081e6a7425c56.tar.gz
jquery-ui-164e46e9aa6b9e190979a5073cd081e6a7425c56.zip
Accordion: Use .show()/.hide() for initial panel visibility.
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r--ui/jquery.ui.accordion.js7
1 files changed, 5 insertions, 2 deletions
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;