October 31, 2010

Sometimes when we write posts in our web, we don't want our post looks too long. It makes people bored and don't want to read that.
One of many solutions for the long text is a spoiler script.

Spoiler script helps you to 'hide' some of your writting. it look like this:

Spoiler:


Here i'm hiding :D




How can we do that?
The spoiler script is this:




Spoiler:


<div style="margin: 0px;">
<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;">
Your Text Goes Here
<br>
</div>
</div>
</div>




Just copy and paste that to your post editor. :)

Try that,
it works!

Gbu

0 comment(s):

Post a Comment