1(function ($) { 2"use strict"; 3 4 5// ================================ 6// WOW.js Initialization 7// ================================ 8new WOW().init(); 9 10// ================================ 11// Toggle Sub-Menus 12// ================================ 13$('.sub-btn').on('click', function () { 14 $(this).next('.sub-menu').slideToggle(); 15 $(this).find('.dropdown').toggleClass('rotate'); 16}); 17 18 19})(jQuery); 20 21// ================================ 22// DOM Ready 23// ================================ 24document.addEventListener("DOMContentLoaded", () => { 25 26 27// ================================ 28// Element References 29// ================================ 30const preloader = document.querySelector('.preloader'); 31const menuBtn = document.querySelector('#header .menu .menu-btn i'); 32const sideBar = document.querySelector('.sidebar'); 33const popup = document.getElementById("popup"); 34const popupClose = document.querySelector(".popup-close"); 35const yearSpan = document.querySelector('.year'); 36const announcementImg = document.getElementById("announcementImage"); 37const lightbox = document.getElementById("imageLightbox"); 38const lightboxImg = document.getElementById("lightboxImg"); 39const lightboxCloseBtn = document.querySelector(".lightbox-close"); 40 41const currentYear = new Date().getFullYear(); 42 43// ================================ 44// Popup on Page Load 45// ================================ 46window.addEventListener("load", () => { 47 if (popup) { 48 setTimeout(() => popup.classList.add("active"), 500); 49 } 50}); 51 52// Close Popup 53if (popup && popupClose) { 54 popupClose.addEventListener("click", () => { 55 popup.classList.remove("active"); 56 }); 57} 58 59// ================================ 60// Preloader Handling 61// ================================ 62window.addEventListener("load", () => { 63 if (preloader) { 64 preloader.classList.add('loader-end'); 65 66 preloader.addEventListener("transitionend", () => { 67 if (document.body.contains(preloader)) { 68 document.body.removeChild(preloader); 69 } 70 }); 71 } 72}); 73 74// ================================ 75// Sidebar Menu Toggle 76// ================================ 77if (menuBtn && sideBar) { 78 menuBtn.addEventListener("click", () => { 79 if (window.innerWidth <= 802) { 80 sideBar.classList.toggle("active"); 81 } 82 menuBtn.classList.toggle("bi-x"); 83 }); 84} 85 86// ================================ 87// Announcement Image Lightbox 88// ================================ 89if (announcementImg && lightbox && lightboxImg) { 90 announcementImg.addEventListener("click", () => { 91 lightbox.style.display = "block"; 92 lightboxImg.src = announcementImg.src; 93 }); 94} 95 96if (lightboxCloseBtn && lightbox) { 97 lightboxCloseBtn.addEventListener("click", () => { 98 lightbox.style.display = "none"; 99 }); 100} 101 102// Close lightbox if user clicks outside image 103if (lightbox) { 104 window.addEventListener("click", (e) => { 105 if (e.target === lightbox) { 106 lightbox.style.display = "none"; 107 } 108 }); 109} 110 111// ================================ 112// Set Current Year 113// ================================ 114if (yearSpan) { 115 yearSpan.textContent = currentYear; 116} 117 118 119});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.