Spaces:
Running
Running
Download script.js from Deste12/telemaster-pro-revamp: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/Deste12/telemaster-pro-revamp/resolve/main/script.js
- Command line
-
hf download hf://spaces/Deste12/telemaster-pro-revamp/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Deste12/telemaster-pro-revamp/resolve/main/script.js
1.14 kB
| // Main JavaScript functionality | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // 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' | |
| }); | |
| } | |
| }); | |
| }); | |
| // Form submission handling | |
| const contactForm = document.querySelector('form'); | |
| if (contactForm) { | |
| contactForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Here you would typically send the form data to a server | |
| alert('Дякуємо за ваше повідомлення! Ми зв\'яжемося з вами найближчим часом.'); | |
| this.reset(); | |
| }); | |
| } | |
| }); |