-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
25 lines (23 loc) · 712 Bytes
/
scripts.js
File metadata and controls
25 lines (23 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Smooth scroll for the Learn More button
function scrollTo(selector) {
document.querySelector(selector).scrollIntoView({ behavior: 'smooth' });
}
// Load Hero Lottie Animation
lottie.loadAnimation({
container: document.getElementById('hero-animation'),
path: 'assets/hero-lottie.json',
renderer: 'svg',
loop: true,
autoplay: true,
});
// Simple testimonial carousel
let current = 0;
const testimonials = document.querySelectorAll('.testimonial');
function showTestimonial(idx) {
testimonials.forEach((t, i) => t.style.display = i === idx ? 'block' : 'none');
}
showTestimonial(current);
setInterval(() => {
current = (current + 1) % testimonials.length;
showTestimonial(current);
}, 5000);