Our Spoiler BBCode

Get help with just about anything and everything NOT Warcraft related. Computers, consoles, phones, whatever!
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

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 for BBCode:

Code: Select all

[spoiler={TEXT1}]{TEXT2}[/spoiler]
Spoiler for 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>

Code: Select all

spoiler2
Spoiler for BBCode:

Code: Select all

[spoiler]{TEXT}[/spoiler]
Spoiler for 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>
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