Spaces:
Sleeping
Sleeping
File size: 526 Bytes
4450790 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
/**
* File: foldable.js
* Project: comfy_mtb
* Author: Mel Massadian
*
* Copyright (c) 2023 Mel Massadian
*
*/
function toggleFoldable(elementId, symbolId) {
const content = document.getElementById(elementId)
const symbol = document.getElementById(symbolId)
if (content.style.display === 'none' || content.style.display === '') {
content.style.display = 'flex'
symbol.innerHTML = '▽' // Down arrow
} else {
content.style.display = 'none'
symbol.innerHTML = '▷' // Right arrow
}
}
|