1( function( $ ) { 2 'use strict'; 3 4// --------------------------------------------- // 5// Loader & Loading Animation Start 6// --------------------------------------------- // 7 const loadingWrap = document.querySelector('.loading-wrap'); 8 const loadingItems = loadingWrap ? loadingWrap.querySelectorAll('.loading__item') : []; 9 const fadeInItems = document.querySelectorAll('.loading__fade'); 10 11 function startLoader() { 12 let counterElement = document.querySelector(".loader__count .count__text"); 13 let currentValue = 0; 14 function updateCounter() { 15 if (currentValue < 100) { 16 let increment = Math.floor(Math.random() * 10) + 1; 17 currentValue = Math.min(currentValue + increment, 100); 18 counterElement.textContent = currentValue; 19 let delay = Math.floor(Math.random() * 120) + 25; 20 setTimeout(updateCounter, delay); 21 } 22 } 23 updateCounter(); 24 25 } 26 startLoader(); 27 28 window.addEventListener('load', () => { 29 hideLoader(); 30 pageAppearance(); 31 }); 32 function hideLoader() { 33 gsap.to(".loader__count", { duration: 0.8, ease: 'power2.in', y: "100%", delay: 1.8 }); 34 gsap.to(".loader__wrapper", { duration: 0.8, ease: 'power4.in', y: "-100%", delay: 2.2 }); 35 setTimeout(() => { 36 document.getElementById("loader").classList.add("loaded"); 37 }, 3200); 38 } 39 40 function pageAppearance() { 41 gsap.set(loadingItems, { opacity: 0 }) 42 gsap.to(loadingItems, { 43 duration: 1.1, 44 ease: 'power4', 45 startAt: {y: 120}, 46 y: 0, 47 opacity: 1, 48 delay: 0.8, 49 stagger: 0.08 50 }, '>-=1.1'); 51 gsap.set(fadeInItems, { opacity: 0 }); 52 gsap.to(fadeInItems, { duration: 0.8, ease: 'none', opacity: 1, delay: 3.2 }); 53 } 54 55// --------------------------------------------- // 56// Loader & Loading Animation End 57// --------------------------------------------- // 58 59} )( jQuery );
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.