Create Spoiler in Blog

Do you want to make spoiler in your blog? It's easy.
For those who haven't heard about spoiler, you can see the example of spoiler below:
THE TITLE OF SPOILER:
THE CONTENT INSIDE SPOILER...


What do you think about that? You can make your blog much more tidy. And, if you have lot of images in one post, you can use spoiler to hide the image inside the spoiler, and let the visitor to open the spoiler as they wish.
Ok. Now's the time for the codes. Please copy and paste this code to your blog post. Don't forget to use the HTML view.
<div><div style="margin-bottom: 2px;">
<i><b>THE TITLE OF SPOILER: </b></i>
<input value="Show" style="margin: 0px; padding: 0px; width: 60px; font-size: 10px;" 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'; }" type="button"/></div><div style="border: 1px inset ; margin: 0px; padding: 6px;">
<div style="display: none;">
THE CONTENT INSIDE SPOILER...
</div></div></div>

It's easy, isn't it? Good luck...

Labels: , , , , , , ,