BBCode - Custom Spoiler
*Update released! In the new code the button will automatically adjust it's width to tightly fit all the text in the title.. You don't have to worry about keeping your title small anymore! enjoy!
If you like this you may also like the image preview spoiler for large images I have seen spoiler code before but I am not sure if there is any spoiler code 4.0 for a custom spoiler where you can enter the text that appear on the button (ex. Click to view hidden message) and also show what is on the inside... Here is my code I made: ** There is a known glitch where in the button title if you put the following symbol in the name ' then it will not work... If anyone can fix this please let me know because I have tried.. Other than that, the code works fine! Enjoy! (Screenshots below) Title: Code:
Spoiler Code:
spoiler Code:
<div> <div class="pre-spoiler"> <input type="button" value=" {option} " style="font-size:14px;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.value = '{option}';}"> </div> <div> <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div> </div> </div> Code:
[spoiler=enter your title here]enter your text here[/spoiler] Code:
Shows and hides text with the click of a button. (Glitch: In the button title... do not use this symbol ' ) Code:
Yes. Download No files for download. Screenshots |
Similar Mods
BB Code Enhancements DI - BBCode [spoiler] | vBulletin 3.7 Add-ons |