First commit
This commit is contained in:
20
script.js
Normal file
20
script.js
Normal file
@@ -0,0 +1,20 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Newsletter form submission
|
||||
const form = document.getElementById('newsletter-form');
|
||||
form.addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
const email = e.target.querySelector('input[type="email"]').value;
|
||||
// Here you would typically send this to your backend
|
||||
alert('Thanks for subscribing! Check your email for confirmation.');
|
||||
form.reset();
|
||||
});
|
||||
|
||||
// Add subtle parallax effect to video background
|
||||
document.addEventListener('mousemove', (e) => {
|
||||
const mouseX = e.clientX / window.innerWidth;
|
||||
const mouseY = e.clientY / window.innerHeight;
|
||||
|
||||
const video = document.getElementById('background-video');
|
||||
video.style.transform = `scale(1.1) translate(${mouseX * -20}px, ${mouseY * -20}px)`;
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user