phantasma/app/static/js/about.js

11 lines
362 B
JavaScript
Raw Normal View History

document.querySelectorAll('.accordion-checkbox').forEach(cbox => {
cbox.addEventListener('change', function() {
const label = this.previousElementSibling
const caret = label.querySelector('.text')
if (cbox.checked) {
caret.innerHTML = '▼'
} else {
caret.innerHTML = '▶'
}
})
})