View Full Version : Help with BBCODE Spoiler
odarriba
01-11-2015, 12:34 PM
Hello.
I would like to create this effect.
When someone clicks on the white part of the text is displayed in black.
https://vborg.vbsupport.ru/external/2015/01/4.gif
Sorry for my english.
ozzy47
01-11-2015, 12:41 PM
Do a search for spoiler, there is a bunch of spoiler mods available.
odarriba
01-11-2015, 01:49 PM
I assure you that I have seen almost every mod there but in particular I wish it were so.
If you can not ... thanks anyway.
MarkFL
01-12-2015, 02:01 PM
Try this in the "Replacement" field of your custom BBCode:
<div style="padding-left: 10px">
<b>Spoiler: </b><span style="color: #A0A0A0">[ pulsa para ver ]</span>
<div style="border-radius: 6px 0px 0px 6px; border: 1px inset black; margin-right: 40%; margin-top: 5px" >
<div style="cursor: pointer" title="Click to Reveal Contents" onclick="if (this.firstElementChild.style.visibility == 'hidden'){this.firstElementChild.style.visibility = 'visible'; this.title='Click to Hide Contents'} else {this.firstElementChild.style.visibility = 'hidden'; this.title='Click to Reveal Contents'}">
<div style="visibility: hidden; padding: 5px">
{param}
</div>
</div>
</div>
</div>
odarriba
01-13-2015, 10:19 AM
Try this in the "Replacement" field of your custom BBCode:
<div style="padding-left: 10px">
<b>Spoiler: </b><span style="color: #A0A0A0">[ pulsa para ver ]</span>
<div style="border-radius: 6px 0px 0px 6px; border: 1px inset black; margin-right: 40%; margin-top: 5px" >
<div style="cursor: pointer" title="Click to Reveal Contents" onclick="if (this.firstElementChild.style.visibility == 'hidden'){this.firstElementChild.style.visibility = 'visible'; this.title='Click to Hide Contents'} else {this.firstElementChild.style.visibility = 'hidden'; this.title='Click to Reveal Contents'}">
<div style="visibility: hidden; padding: 5px">
{param}
</div>
</div>
</div>
</div>
Magnificent! Thanks for your help nobody knew how to do it or did not understand me.
Spoiler Forocoches... Yes! :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.