Spoiler Tags

Zexion

New Arrival
Joined
Nov 26, 2008
Messages
18
Reaction score
0
FP$
6
What do you guys think is the best spoiler tag code there is? I tried the one posted on the main phpBB forum, but the border stretches throughout the whole thing when I really want it to be more... even, so to speak. Plus, what's the spoiler tag here? I really like it. ^^
 
I know there are some quite fancy Javascript BBCodes out there, i'll have a look around and see what I can find.

Have a try with this BBCode, it works the same way as Prosilver's Code box, only expands and collapses as you'd expect a spoiler tag to. ~smile~

BBCode:
Code:
[spoiler]{TEXT}[/spoiler]

HTML:
Code:
    <div style="padding: 3px; background-color: #FFFFFF; border: 1px solid #d8d8d8; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span 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.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>show</a>'; }" /><b>Spoiler: </b><a href="#" onClick="return false;">show</a></span></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>


Edit: I think this is the spoiler code they use here -> http://www.theadminzone.com/forums/show ... hp?t=24586 ~smile~
 
Back
Top Bottom