mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Add sliding animations to the accordion. props kovshenin, DrewAPicture, helen. fixes #23890.
git-svn-id: http://core.svn.wordpress.org/trunk@24644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bcd2644d92
commit
561a323362
@ -8884,9 +8884,6 @@ a.widget-control-edit {
|
||||
.accordion-section.open .accordion-section-content,
|
||||
.no-js .accordion-section .accordion-section-content {
|
||||
display: block;
|
||||
background: #fdfdfd;
|
||||
border-left: 1px solid #dfdfdf;
|
||||
border-right: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
.accordion-section.open:hover {
|
||||
@ -8897,6 +8894,9 @@ a.widget-control-edit {
|
||||
display: none;
|
||||
padding: 10px 20px 15px;
|
||||
overflow: hidden;
|
||||
background: #fdfdfd;
|
||||
border-left: 1px solid #dfdfdf;
|
||||
border-right: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
.accordion-section-title {
|
||||
|
@ -5,12 +5,16 @@ jQuery(document).ready( function($) {
|
||||
return;
|
||||
e.preventDefault(); // Keep this AFTER the key filter above
|
||||
|
||||
var section = $( this ).closest( '.accordion-section' );
|
||||
var section = $( this ).closest( '.accordion-section' ),
|
||||
siblings = section.siblings( '.open' ),
|
||||
content = section.find( '.accordion-section-content' );
|
||||
|
||||
if ( section.hasClass('cannot-expand') )
|
||||
return;
|
||||
|
||||
section.siblings( '.open' ).removeClass( 'open' );
|
||||
siblings.removeClass( 'open' );
|
||||
siblings.find( '.accordion-section-content' ).show().slideUp( 150 );
|
||||
content.toggle( section.hasClass( 'open' ) ).slideToggle( 150 );
|
||||
section.toggleClass( 'open' );
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user