Files
webtech/ora8/hamlet/script.js

13 lines
494 B
JavaScript
Raw Normal View History

2025-11-14 17:30:19 +01:00
function toggleStageDirections(){
console.log('button is clicked');
document.querySelectorAll('.stagedir').forEach(stagedir => {
const isShown = getComputedStyle(stagedir).display !== 'none';
if(isShown){
stagedir.style.display = 'none';
}else{
stagedir.style.display = stagedir.tagName === 'DIV' ? 'block' : 'inline';
}
})
}
document.getElementById("toggle-stagedir-button").addEventListener('click', toggleStageDirections);