multimodalart's picture
Squashing commit
4450790 verified
raw
history blame contribute delete
526 Bytes
/**
* 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
}
}