wordpress-activitypub-event.../assets/js/activitypub-event-bridge-admin.js
André Menrath 2da7bd443c
All checks were successful
PHP Code Checker / PHP Code Checker (push) Successful in 49s
PHPUnit / PHPUnit – PHP 8.1 (push) Successful in 59s
PHPUnit / PHPUnit – PHP 8.2 (push) Successful in 1m2s
PHPUnit / PHPUnit – PHP 8.3 (push) Successful in 58s
Add "How to Check if It's Working" section in admin (#70)
Reviewed-on: #70
Co-authored-by: André Menrath <andre.menrath@posteo.de>
Co-committed-by: André Menrath <andre.menrath@posteo.de>
2024-10-22 18:52:57 +02:00

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 );
}
} );
} );