thisgeek |
04-25-2006 06:00 AM |
I created the following at Tralala's request (I'm not sure if it's quite what he's looking for), but if anyone else is interested, here it is:
Code:
<span>
<span style="margin-bottom: 5px; background-color: #FFFFFF;">
<input type="button" value="Show Spoiler" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.value == 'Show Spoiler') { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.color = '#FF0000'; this.value = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.color = '#FFFFFF'; this.value = 'Show Spoiler';}">
</span>
<span>
<span style="padding: 0 3px 0 3px; color: #FFFFFF;">{param}</span>
</span>
</span>
The idea is that the text area is still there - ie, hitting the 'show' button won't push the text out the way. If you highlight the spoiler, or push the button, you'll see the text - this is sort of a 'best of both worlds' type spoiler tag. You probably will need to fiddle with the #COLOR values to get it to fit into your theme.
|