I hereby request a Show/Hide BBCode that hides its inner text behind a “Show”-Button. Then one can show more unuseful code/stuff without killing a page.
<div style="margin:20px; margin-top:5px;">
<div class="quotetitle">
<input class="button2 btnlite" type="button" value=" Show " style="text-align:center;width:100px;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="quotecontent"><div style="display: none;">
{TEXT}
</div></div>
</div>
This is my code for a phpBB forum. Maybe you can adjust it for SMF
I don’t remember the reasons behind “this.innerText = ‘’;”