flowsync-orderly / script.js
Akramjon111's picture
change the word TRACK every shipment to ORDER STATUS
13585a0 verified
Raw History Blame Contribute Delete
1.51 kB
document.addEventListener('DOMContentLoaded', function() {
// Form validation
const form = document.querySelector('form');
if (form) {
form.addEventListener('submit', function(e) {
const email = document.getElementById('email');
const password = document.getElementById('password');
if (!email.value || !password.value) {
e.preventDefault();
alert('Please fill in all fields');
return false;
}
// Simulate successful login
console.log('Login submitted:', {
email: email.value,
password: password.value
});
// In a real app, you would handle the form submission here
// e.preventDefault();
// handleLogin(email.value, password.value);
});
}
// Add animation to the delivery truck logo on hover
const logo = document.querySelector('.flex.justify-center div');
if (logo) {
logo.addEventListener('mouseenter', function() {
this.style.animation = 'pulse 1.5s infinite';
});
logo.addEventListener('mouseleave', function() {
this.style.animation = 'none';
});
}
// Add hover effects to buttons
const buttons = document.querySelectorAll('button, a[href="#"]');
buttons.forEach(button => {
button.classList.add('btn-transition', 'btn-hover');
});
});