ÿØÿà JFIF ` ` ÿáfExif MM * i >ê 2 ê ê P ê ÿþ ?CREATOR: gd-jpeg v1.0 (usi
|
Server : Apache System : Linux gains.enterpriseappscloud.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : beyondlimi ( 2438) PHP Version : 7.4.33 Disable Function : allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo Directory : /home/beyondlimi/domains/beyondlimits.org.in/public_html/admin/assets/js/ |
Upload File : |
/*
Template Name: Admin Template
Author: Wrappixel
File: js
*/
// ==============================================================
// Auto select left navbar
// ==============================================================
$(function () {
"use strict";
var url = window.location + "";
var path = url.replace(
window.location.protocol + "//" + window.location.host + "/",
""
);
var element = $("ul#sidebarnav a").filter(function () {
return this.href === url || this.href === path; // || url.href.indexOf(this.href) === 0;
});
function findMatchingElement() {
var currentUrl = window.location.href;
var anchors = document.querySelectorAll("#sidebarnav a");
for (var i = 0; i < anchors.length; i++) {
if (anchors[i].href === currentUrl) {
return anchors[i];
}
}
return null; // Return null if no matching element is found
}
var elements = findMatchingElement();
// Do something with the matching element
if(elements){
elements.classList.add("active");
}
document
.querySelectorAll("ul#sidebarnav ul li a.active")
.forEach(function (link) {
link.closest("ul").classList.add("in");
link.closest("ul").parentElement.classList.add("selected");
});
document.querySelectorAll("#sidebarnav li").forEach(function (li) {
const isActive = li.classList.contains("selected");
if (isActive) {
const anchor = li.querySelector("a");
if (anchor) {
anchor.classList.add("active");
}
}
});
document.querySelectorAll("#sidebarnav a").forEach(function (link) {
link.addEventListener("click", function (e) {
const isActive = this.classList.contains("active");
const parentUl = this.closest("ul");
if (!isActive) {
// hide any open menus and remove all other classes
parentUl.querySelectorAll("ul").forEach(function (submenu) {
submenu.classList.remove("in");
});
parentUl.querySelectorAll("a").forEach(function (navLink) {
navLink.classList.remove("active");
});
// open our new menu and add the open class
const submenu = this.nextElementSibling;
if (submenu) {
submenu.classList.add("in");
}
this.classList.add("active");
} else {
this.classList.remove("active");
parentUl.classList.remove("active");
const submenu = this.nextElementSibling;
if (submenu) {
submenu.classList.remove("in");
}
}
});
});
});