Sure it can, we can write a simple script for it assuming there’s no animation.
But for best practices, can you add unique IDs to the custom HTML block and the button trigger?
The script will be something like this:
<script>
let toggleBtn = document.querySelector("#toggle-btn");
let targetElement = document.querySelector("#toggled-container");
toggleBtn.addEventListener('click',function(e){
e.preventDefault();
targetElement.classList.toggle('show-content');
});
</script>
and then add this CSS:
#toggled-container{
display: none;
}
#toggled-container.show-content{
display: block !important;
}
This is assuming you’re using the selectors I’ve specified in the code. ๐