Our Spoiler BBCode

Get help with just about anything and everything NOT Warcraft related. Computers, consoles, phones, whatever!
User avatar
Dekar
Forum Drunk
Posts: 2895
Joined: January 17th, 2007, 4:22 pm
Location: Darmstadt, Germany

Our Spoiler BBCode

Post by Dekar »

Someone asked me for them so I'm posting them here in case others want them as well. I am pretty sure I copied the javascript/html myself - so this is not my work!

Code: Select all

spoiler1
[spoiler=BBCode]

Code: Select all

[spoiler={TEXT1}]{TEXT2}[/spoiler]
[/spoiler]
[spoiler=HTML replacement]

Code: Select all

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b> for <i>{TEXT1}</i>: <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';      this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{TEXT2}
</div>
</div>
</div>
[/spoiler]

Code: Select all

spoiler2
[spoiler=BBCode]

Code: Select all

[spoiler]{TEXT}[/spoiler]
[/spoiler]
[spoiler=HTML replacement]

Code: Select all

<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b>: <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';      this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{TEXT}
</div>
</div>
</div>
[/spoiler]
Don't pm me with Warcraft questions, this is a forum so just make a post!

In the world of thinking we are all immigrants. -Robert Nozick