jayxjay's picture
A website where business owners can reach affiliate marketers to market their products with a another phase where affiliate marketers can sign in to be reachable by business owners. the name of the website is Affiliate pro
3c730d3 verified
Raw History Blame Contribute Delete
1.54 kB
document.addEventListener('DOMContentLoaded', function() {
// Initialize Feather Icons
feather.replace();
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href');
if (targetId === '#') return;
const targetElement = document.querySelector(targetId);
if (targetElement) {
targetElement.scrollIntoView({
behavior: 'smooth'
});
}
});
});
// Mobile menu toggle functionality will be handled by navbar component
});
// Function to handle sign up forms
function handleSignUp(formId, successMessage) {
const form = document.getElementById(formId);
if (form) {
form.addEventListener('submit', function(e) {
e.preventDefault();
// Here you would typically send the form data to your server
alert(successMessage || 'Thank you for signing up! We will be in touch soon.');
form.reset();
});
}
}
// Initialize form handlers when DOM is loaded
document.addEventListener('DOMContentLoaded', function() {
handleSignUp('business-signup', 'Thank you for your interest! Our team will contact you shortly.');
handleSignUp('affiliate-signup', 'Welcome to our affiliate network! Check your email for next steps.');
});