(function () { const hash = window.location.hash; // Custom smooth scroll function with 2000ms duration function smoothScrollTo(target, duration = 2000) { const targetPosition = target.getBoundingClientRect().top + window.pageYOffset; const startPosition = window.pageYOffset; const distance = targetPosition - startPosition; let startTime = null; function animation(currentTime) { if (!startTime) startTime = currentTime; const timeElapsed = currentTime - startTime; const run = easeInOutQuad(timeElapsed, startPosition, distance, duration); window.scrollTo(0, run); if (timeElapsed < duration) requestAnimationFrame(animation); } function easeInOutQuad(t, b, c, d) { t /= d / 2; if (t < 1) return c / 2 * t * t + b; t--; return -c / 2 * (t * (t - 2) - 1) + b; } requestAnimationFrame(animation); } // CASE 1: External links (with #hash in URL on load) if (hash) { window.scrollTo(0, 0); // Prevent instant jump window.addEventListener("load", function () { setTimeout(() => { const target = document.querySelector(hash); if (target) { smoothScrollTo(target, 2000); // Scroll with 2000ms duration } }, 1000); // Adjust delay as needed }); } // CASE 2: Same-page anchor clicks (instant scroll) document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener("click", function (e) { const href = this.getAttribute("href"); const target = document.querySelector(href); if (target) { e.preventDefault(); target.scrollIntoView({ behavior: "auto" }); // No animation } }); }); }); })();

August 30

Link Factory verification

verification

APPLY HERE

Accepted file types: pdf, doc, docx, Max. file size: 25 MB.


Other Vacancies