Wednesday, January 25, 2012

Creating Spoiler

To prevent long post and minimize scrolling, Use this code in your blog to create spoiler
---------------------------------------------------------------------------------------------
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;"><b>Spoiler</b>: <input value="Open" style="margin: 0px; padding: 0px; width: 55px; font-size: 11px;" 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 = 'Close'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Open'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset ; margin: 0px; padding: 6px;">
<div style="display: none;">

Post Goes Here!!

<br>
</div>
</div>
</div>
----------------------------------------------------------------------------------------------


That code will make this spoiler.

Spoiler:

Post Goes Here!!


Have fun :)