HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/iranga.kauko.lt/wp-content/plugins/woocommerce-bookings.test/assets/js/settings.js
jQuery( document ).ready( function ( $ ) {
	// Open/close
	$( '.wc-metaboxes-wrapper' ).on( 'click', '.wc-metabox h3', function ( event ) {
		// If the user clicks on some form input inside the h3, like a select list (for variations), the box should not be toggled
		if ( $( event.target ).filter( ':input, option' ).length ) {
			return;
		}

		$( this ).next( '.wc-metabox-content' ).toggle();
	})
	.on( 'click', '.expand_all', function () {
		$( this ).closest( '.wc-metaboxes-wrapper' ).find( '.wc-metabox > table' ).show();
		return false;
	})
	.on( 'click', '.close_all', function () {
		$( this ).closest( '.wc-metaboxes-wrapper' ).find( '.wc-metabox > table' ).hide();
		return false;
	});

	$( '.wc-metabox.closed' ).each( function () {
		$( this ).find( '.wc-metabox-content' ).hide();
	});

	$( '.wc-metabox > h3' ).on( 'click', function () {
		$( this ).parent( '.wc-metabox' ).toggleClass( 'closed' ).toggleClass( 'open' );
	});
});