Hi, I'm setting up a small website where I wanted to use several images as a button that when clicking each displayed a different text, how can I do that?
I tested this one but it does not close the first text when opening the second, everything is mixed in the same space.
<div class="divspoiler">
<input type="image" src="IMAGEM AQUI" onclick="if (this.parentNode.nextSibling.childNodes[0].style.display != '') { this.parentNode.nextSibling.childNodes[0].style.display = ''; this.value = 'Ocultar'; } else { this.parentNode.nextSibling.childNodes[0].style.display = 'none'; this.value = 'Mostrar'; }" />
</div><div><div class="spoiler" style="display: none;">TEXTOOOOOO
</div></div>