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/ideasforum.kaunokolegija.lt/wp-content/plugins/insert-pages/js/widget.js
jQuery( document ).ready( function ( $ ) {
	// Enable/Disable template dropdown based on display choice in widget options.
	$( document ).on( 'change', '.insertpage-format-select', function() {
		if ( $( this ).val() == 'template' ) {
			$( '.insertpage-template-select' ).removeAttr( 'disabled' );
			if ( $( this ).is( ':focus' ) ) {
				$( '.insertpage-template-select' ).focus();
			}
		} else {
			$( '.insertpage-template-select' ).attr( 'disabled', 'disabled' );
		}
	});
	$( document ).on( 'widget-updated', function () {
		$( '.insertpage-format-select' ).change();
	})
	$( '.insertpage-format-select' ).change();

});