brpuneet898 pranshh commited on
Commit
d111d4d
·
verified ·
1 Parent(s): e709222

Update static/index.js (#4)

Browse files

- Update static/index.js (eddd17b55493a436ca0f81e48536dc50f40a27fb)


Co-authored-by: Pranshu Jaiswal <pranshh@users.noreply.huggingface.co>

Files changed (1) hide show
  1. static/index.js +8 -0
static/index.js CHANGED
@@ -1,4 +1,12 @@
1
  document.addEventListener('DOMContentLoaded', () => {
 
 
 
 
 
 
 
 
2
  console.log('Landing page loaded.');
3
 
4
  // Animate elements on scroll using Intersection Observer
 
1
  document.addEventListener('DOMContentLoaded', () => {
2
+ const navLinks = document.querySelectorAll('header nav a');
3
+ navLinks.forEach(link => {
4
+ link.addEventListener('click', function(event) {
5
+ event.stopImmediatePropagation();
6
+ window.location.href = this.href;
7
+ }, true);
8
+ });
9
+
10
  console.log('Landing page loaded.');
11
 
12
  // Animate elements on scroll using Intersection Observer