Uname: Linux gra108.truehost.cloud 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.2.26 [ PHP INFO ] PHP os: Linux
Server Ip: 87.98.244.154
Your Ip: 3.145.152.49
User: pumpbmko (2127) | Group: pumpbmko (2132)
Safe Mode: OFF
Disable Function:
allow_url_fopen, show_source, system, shell_exec, passthru, exec, phpinfo, mail, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apallow_url_fopen,show_source, system, shell_exec, passthru, exec, phpinfo, mail, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, ap

name : tabs.ts
import jQuery from "jquery";

export default function setupTabsNavigation() {
	jQuery(".heatbox-tab-nav-item").on("click", function () {
		jQuery(".heatbox-tab-nav-item").removeClass("active");
		jQuery(this).addClass("active");

		const link = this.querySelector("a");
		if (!link) return;

		if (link.href.indexOf("#") === -1) return;

		const hashValue = link.href.substring(link.href.indexOf("#") + 1);

		jQuery(".heatbox-panel-wrapper .heatbox-admin-panel").css(
			"display",
			"none"
		);

		jQuery(".heatbox-panel-wrapper .kirki-" + hashValue + "-panel").css(
			"display",
			"block"
		);
	});

	window.addEventListener("load", function () {
		let hashValue = window.location.hash.substring(1);
		let currentActiveTabMenu: HTMLElement | null = null;

		if (!hashValue) {
			currentActiveTabMenu = document.querySelector(
				".heatbox-tab-nav-item.active"
			);

			if (currentActiveTabMenu && currentActiveTabMenu.dataset.tab) {
				hashValue = currentActiveTabMenu.dataset.tab;
			}

			hashValue = hashValue ? hashValue : "settings";
		}

		jQuery(".heatbox-tab-nav-item").removeClass("active");
		jQuery(".heatbox-tab-nav-item.kirki-" + hashValue + "-panel").addClass(
			"active"
		);

		jQuery(".heatbox-panel-wrapper .heatbox-admin-panel").css(
			"display",
			"none"
		);

		jQuery(".heatbox-panel-wrapper .kirki-" + hashValue + "-panel").css(
			"display",
			"block"
		);
	});
}
© 2025 GrazzMean-Shell