-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
22 lines (20 loc) · 850 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// JavaScript to handle the interactive flowchart
const flowSteps = document.querySelectorAll('.flow-step');
const descriptionBox = document.getElementById('descriptionBox');
const descriptionText = document.getElementById('descriptionText');
// Event listeners for each flow step
flowSteps.forEach(step => {
step.addEventListener('mouseenter', () => {
const description = step.getAttribute('data-description');
descriptionText.textContent = description;
descriptionBox.style.display = 'block';
});
step.addEventListener('mouseleave', () => {
descriptionBox.style.display = 'none';
});
});
document.querySelector('form').addEventListener('submit', function(event) {
event.preventDefault();
alert('Thank you for subscribing!');
this.reset(); // Clears the input field after submitting
});