Skip to content

Commit ab8a23b

Browse files
authored
Update script.js
1 parent 5e7d280 commit ab8a23b

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

script.js

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,7 @@ document.addEventListener('DOMContentLoaded', (event) => {
1111
});
1212
});
1313

14-
// Intersection Observer for fade-in effect
15-
const observer = new IntersectionObserver((entries) => {
16-
entries.forEach(entry => {
17-
if (entry.isIntersecting) {
18-
entry.target.classList.add('fade-in');
19-
}
20-
});
21-
}, { threshold: 0.1 });
22-
23-
document.querySelectorAll('.case-study').forEach(caseStudy => {
24-
observer.observe(caseStudy);
25-
});
26-
27-
// Parallax effect for header
28-
window.addEventListener('scroll', () => {
29-
const scrollPosition = window.pageYOffset;
30-
document.querySelector('header').style.backgroundPositionY = scrollPosition * 0.5 + 'px';
31-
});
32-
33-
// Toggle mobile menu
14+
// Mobile menu toggle
3415
const menuToggle = document.querySelector('.menu-toggle');
3516
const nav = document.querySelector('nav ul');
3617

@@ -39,4 +20,6 @@ document.addEventListener('DOMContentLoaded', (event) => {
3920
nav.classList.toggle('show');
4021
});
4122
}
23+
24+
// Add any other JavaScript functionality here
4225
});

0 commit comments

Comments
 (0)