i want a website for my digital service company called Sonate code, a society works in IA, mobile app and web application
2b3e12f verified Download script.js from luckaerickson/sonate-code-digital-crafters-symphony: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/spaces/luckaerickson/sonate-code-digital-crafters-symphony/resolve/main/script.js
- Command line
-
hf download hf://spaces/luckaerickson/sonate-code-digital-crafters-symphony/script.js
-
curl -L -o script.js https://huggingface.co/spaces/luckaerickson/sonate-code-digital-crafters-symphony/resolve/main/script.js
1.42 kB
| document.addEventListener('DOMContentLoaded', function() { | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Form submission handler | |
| const contactForm = document.querySelector('form'); | |
| if (contactForm) { | |
| contactForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Here you would typically send the form data to your server | |
| alert('Thank you for your message! We will get back to you soon.'); | |
| this.reset(); | |
| }); | |
| } | |
| // Intersection Observer for animations | |
| const animateOnScroll = function() { | |
| const elements = document.querySelectorAll('.fade-in-on-scroll'); | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('animate-fadeIn'); | |
| observer.unobserve(entry.target); | |
| } | |
| }); | |
| }, { threshold: 0.1 }); | |
| elements.forEach(element => { | |
| observer.observe(element); | |
| }); | |
| }; | |
| animateOnScroll(); | |
| }); |