最近の検索
最近の検索はありません

Jason McDonald
参加日2023年2月24日
·
前回のアクティビティ2023年2月27日
フォロー中
0
フォロワー
0
合計アクティビティ
6
投票
0
サブスクリプション
1
アクティビティの概要
バッジ
記事
投稿
コミュニティへのコメント
記事へのコメント
アクティビティの概要
さんの最近のアクティビティ Jason McDonald
Jason McDonaldさんがコメントを作成しました:
コメントを表示 · 投稿日時:2023年2月27日 · Jason McDonald
0
フォロワー
0
投票
0
コメント
Jason McDonaldさんがコメントを作成しました:
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?
コメントを表示 · 編集日時:2023年2月24日 · Jason McDonald
0
フォロワー
0
投票
0
コメント
Jason McDonaldさんがコメントを作成しました:
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.
コメントを表示 · 投稿日時:2023年2月24日 · Jason McDonald
0
フォロワー
0
投票
0
コメント