André Menrath
2da7bd443c
Reviewed-on: Event-Federation/wordpress-activitypub-event-bridge#70 Co-authored-by: André Menrath <andre.menrath@posteo.de> Co-committed-by: André Menrath <andre.menrath@posteo.de>
14 lines
556 B
JavaScript
14 lines
556 B
JavaScript
jQuery( function( $ ) {
|
|
// Accordion handling in various areas.
|
|
$( '.activitypub-event-bridge-settings-accordion' ).on( 'click', '.activitypub-event-bridge-settings-accordion-trigger', function() {
|
|
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
|
|
|
|
if ( isExpanded ) {
|
|
$( this ).attr( 'aria-expanded', 'false' );
|
|
$( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', true );
|
|
} else {
|
|
$( this ).attr( 'aria-expanded', 'true' );
|
|
$( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false );
|
|
}
|
|
} );
|
|
} );
|