This commit is contained in:
2026-03-04 09:43:38 +01:00
parent 15808b533d
commit e1ef6af9a9
3 changed files with 190 additions and 42 deletions

View File

@@ -562,8 +562,10 @@ document.addEventListener('DOMContentLoaded', function() {
// ===== SMOOTH SCROLL FOR INTERNAL LINKS =====
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
const href = this.getAttribute('href');
if (!href || href === '#') return;
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
const target = document.querySelector(href);
if (target) {
target.scrollIntoView({
behavior: 'smooth',