HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/bwcdev/wp-content/plugins/gravityforms/includes/settings/js/tabs.js
window.addEventListener( 'load', function() {
	document.querySelectorAll( '.gform-settings-tabs__navigation a' ).forEach( function( tab ) {
		tab.addEventListener( 'click', function ( e ) {

			e.preventDefault();

			// Get selected tab.
			var selectedTab = e.target.dataset.tab;

			// Hide active tab.
			document.querySelectorAll( '.gform-settings-tabs__navigation .active, .gform-settings-tabs__container.active' ).forEach( function( item ) {
				item.classList.remove( 'active' );
			} );

			// Set selected tab to active tab input.
			document.querySelector( 'input[name="gform_settings_tab"]' ).value = selectedTab;

			// Show selected tab.
			e.target.classList.add( 'active' );
			document.querySelector( '.gform-settings-tabs__container[data-tab="' + selectedTab + '"]' ).classList.add( 'active' );

		} );
	} );
} );