wordpress-event-bridge-for-.../assets/js/event-bridge-for-activitypub-admin.js
André Menrath 871af8215c
Some checks failed
PHPUnit / PHPUnit – PHP 8.0 (push) Waiting to run
PHPUnit / PHPUnit – PHP 8.1 (push) Waiting to run
PHPUnit / PHPUnit – PHP 8.2 (push) Waiting to run
PHPUnit / PHPUnit – PHP 8.3 (push) Waiting to run
PHPUnit / PHPUnit – PHP 8.4 (push) Waiting to run
PHP Code Checker / PHP Code Checker (push) Successful in 49s
PHPUnit / PHPUnit – PHP 7.4 (push) Has been cancelled
Fix: renamejs and css admin files to fit new plugin slug.
2024-12-05 17:52:35 +01:00

14 lines
564 B
JavaScript

jQuery( function( $ ) {
// Accordion handling in various areas.
$( '.event-bridge-for-activitypub-settings-accordion' ).on( 'click', '.event-bridge-for-activitypub-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 );
}
} );
} );