I am jut learning Javascript, and am finding it quite annoying.
I managed to make this:
[code]<small> <b>Spoiler:</b></small><br /> <div style=”border: inset 1px gray; padding: 1px;”><div><button type=”button” class=”button” onclick=”this.parentNode.parentNode.childNodes[1].style.display = ”; this.parentNode.style.display = ‘none’;” title=”Click to show the spoiler.”><font color=”#000000″ size=”1″><b>Show Spoiler</b></font></button></div><div id=”spoiler” style=”display: none;”> <br />
Which is a simple spoiler tag. As you can see it is very messy code……
Well, would someone please be able to make it so that the button stays visible when you click the spoiler? And when you click it again, the spoiler hides.
Here is an example of it at my test forum:
[url]http://doghousegifts.net/Upload/showthread.php?tid=2&pid=2#pid2
Thank you,
BP