Notes changes, a few templates.
This commit is contained in:
26
Custom_Templates/customer_templates/customcss.js
Normal file
26
Custom_Templates/customer_templates/customcss.js
Normal file
@ -0,0 +1,26 @@
|
||||
window.addEventListener('load', function () {
|
||||
const callback = function(mutationList, observer) {
|
||||
if (
|
||||
document.querySelectorAll(".transcriptToggle").length > 0 &&
|
||||
document.querySelectorAll(".transcriptContent").length > 0
|
||||
) {
|
||||
var acc = document.getElementsByClassName("transcriptToggle")
|
||||
toggleAccordions(acc)
|
||||
}
|
||||
|
||||
function toggleAccordions(acc) {
|
||||
var i
|
||||
for (i = 0; i < acc.length; i++) {
|
||||
acc[i].addEventListener("click", function () {
|
||||
this.classList.toggle("open")
|
||||
var panel = this.nextElementSibling
|
||||
if (panel.style.maxHeight) {
|
||||
panel.style.maxHeight = null
|
||||
} else {
|
||||
panel.style.maxHeight = panel.scrollHeight + "px"
|
||||
}
|
||||
})
|
||||
}
|
||||
const observer = new MutationObserver(callback);
|
||||
observer.observe(targetNode, config);
|
||||
}}}
|
||||
Reference in New Issue
Block a user