Vor Kurzem aufgerufene Suchen
Keine vor kurzem aufgerufene Suchen

Jason McDonald
Beigetreten 24. Feb. 2023
·
Letzte Aktivität 27. Feb. 2023
Folge ich
0
Follower
0
Gesamtaktivitäten
6
Stimmen
0
Abonnement
1
AKTIVITÄTSÜBERSICHT
BADGES
BEITRÄGE
POSTS
COMMUNITY-KOMMENTARE
BEITRAGSKOMMENTARE
AKTIVITÄTSÜBERSICHT
Neueste Aktivität von Jason McDonald
Jason McDonald hat einen Kommentar hinterlassen
Kommentar anzeigen · Gepostet 27. Feb. 2023 · Jason McDonald
0
Follower
0
Stimmen
0
Kommentare
Jason McDonald hat einen Kommentar hinterlassen
Hi Ifra.
This is exactly what I have done and the accordion won't expand when clicked.
Kommentar anzeigen · Gepostet 27. Feb. 2023 · Jason McDonald
0
Follower
0
Stimmen
0
Kommentare
Jason McDonald hat einen Kommentar hinterlassen
The only code I have added to the script.js file is
document.addEventListener('DOMContentLoaded', function() {
var acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
this.classList.toggle("active");
var panel = this.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
});
}
});
We have multiple HC's for different brands and there's different content writers so I'm not sure what modifications have been made to this particular theme. As I said the accordion is working in other HC's we have.
Is there anyway to find out which part of the theme code is affecting this?
Kommentar anzeigen · Bearbeitet 24. Feb. 2023 · Jason McDonald
0
Follower
0
Stimmen
0
Kommentare
Jason McDonald hat einen Kommentar hinterlassen
script.js:473 Uncaught SyntaxError: Unexpected token 'export'
Kommentar anzeigen · Gepostet 24. Feb. 2023 · Jason McDonald
0
Follower
0
Stimmen
0
Kommentare
Jason McDonald hat einen Kommentar hinterlassen
Hello.
I've added the code Trapta provided at the beginning of the thread and this works perfectly in our sandbox HC.
When I tried doing it on our live environment it's not working. The accordion is here but clicking on it does not expand it.
Kommentar anzeigen · Gepostet 24. Feb. 2023 · Jason McDonald
0
Follower
0
Stimmen
0
Kommentare