when I open inspect element I see syntaxError under console tab?
-
hello.
I get this syntaxError under console tab when I open inspect element on my homepage .
Uncaught SyntaxError: Unexpected token
I have deleted every unneccesary scripts but the problem exists.
I have only this 2 scripts.
the first is for FAQ . I don’t know if something wil be wrong here!
<script> var acc = document.getElementsByClassName('accordion'); var len = acc.length; for (var i = 0; i < len; i++) { acc[i].addEventListener('click', event => { const accordion = event.currentTarget; const currentlyActiveAccordion = document.querySelector('.accordion.active'); if (currentlyActiveAccordion && currentlyActiveAccordion !== accordion) { currentlyActiveAccordion.classList.toggle('active'); currentlyActiveAccordion.nextElementSibling.style.maxHeight = 0; } accordion.classList.toggle('active'); var panel = accordion.nextElementSibling; if (panel.style.maxHeight) { panel.style.maxHeight = null; } else { panel.style.maxHeight = panel.scrollHeight + 'px' } });> } </script>
and second is for slider show :
<script> let slideIndex = 0; showSlides(); function showSlides() { let i; let slides = document.getElementsByClassName("mySlides"); let dots = document.getElementsByClassName("dot"); for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } slideIndex++; if (slideIndex > slides.length) { slideIndex = 1; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex - 1].style.display = "block"; dots[slideIndex - 1].className += " active"; setTimeout(showSlides, 4000); // 4000 = Change image every 4 seconds } </script>
may be it can be in this slidershow script something wrong! but I don’t see myself anything.
can some one tell me what it can be this syntaxError?
thanks
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘when I open inspect element I see syntaxError under console tab?’ is closed to new replies.