mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Accordion: Use .show()/.hide() for initial panel visibility.
This commit is contained in:
parent
474912313a
commit
164e46e9aa
3
themes/base/jquery.ui.accordion.css
vendored
3
themes/base/jquery.ui.accordion.css
vendored
@ -12,5 +12,4 @@
|
||||
.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
|
||||
.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
|
||||
|
7
ui/jquery.ui.accordion.js
vendored
7
ui/jquery.ui.accordion.js
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user