Simplify the accordion sibling-section-closing JS.
see #23890 git-svn-id: https://develop.svn.wordpress.org/trunk@23858 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
38e8fd6923
commit
31858e2511
|
@ -10,7 +10,7 @@ jQuery(document).ready( function($) {
|
||||||
if ( section.hasClass('cannot-expand') )
|
if ( section.hasClass('cannot-expand') )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
section.closest( '.accordion-container' ).find( '.accordion-section' ).not( section ).removeClass( 'open' );
|
section.siblings( '.open' ).removeClass( 'open' );
|
||||||
section.toggleClass( 'open' );
|
section.toggleClass( 'open' );
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue