| | document.addEventListener('DOMContentLoaded', function() { |
| | |
| | document.querySelectorAll('.faq-question').forEach(question => { |
| | question.addEventListener('click', () => { |
| | const answer = question.nextElementSibling; |
| | const icon = question.querySelector('i'); |
| | |
| | |
| | answer.classList.toggle('active'); |
| | |
| | |
| | if (answer.classList.contains('active')) { |
| | icon.style.transform = 'rotate(180deg)'; |
| | } else { |
| | icon.style.transform = 'rotate(0deg)'; |
| | } |
| | |
| | |
| | document.querySelectorAll('.faq-answer').forEach(otherAnswer => { |
| | if (otherAnswer !== answer && otherAnswer.classList.contains('active')) { |
| | otherAnswer.classList.remove('active'); |
| | const otherIcon = otherAnswer.previousElementSibling.querySelector('i'); |
| | otherIcon.style.transform = 'rotate(0deg)'; |
| | } |
| | }); |
| | }); |
| | }); |
| | |
| | |
| | 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) { |
| | window.scrollTo({ |
| | top: targetElement.offsetTop - 80, |
| | behavior: 'smooth' |
| | }); |
| | } |
| | }); |
| | }); |
| | |
| | |
| | document.querySelectorAll('.cta-button').forEach(button => { |
| | button.addEventListener('click', function() { |
| | alert('Thank you for your interest in Thinkio! Our team will contact you shortly.'); |
| | }); |
| | }); |
| | }); |