promptcraft-prodigy / script.js
wolmarsh's picture
Redesign this landing page - https://proompts.cybersyncit.com/
c37cffb verified
Raw History Blame Contribute Delete
706 Bytes
// Main JavaScript file for functionality
document.addEventListener('DOMContentLoaded', function() {
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Mobile menu toggle functionality will be handled by the navbar component
});
// Function to format prices
function formatPrice(price) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD'
}).format(price);
}