Simple Spoiler

This is a quick tutorial on creating a simple spoiler, just copy-paste the script into your html page, and voila.. there you go..

Example :

Spoiler for Pictures ::

andoid ePad keren

Android ePad

The code :

<div>
<div style="margin-bottom: 2px;">
<b>Spoiler</b> for <i>Pictures :</i>:
<input value="Show" style="width: 60px; font-size: 10px; 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'; }" type="button">
</div>
<div style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<img src="https://www.wareground.com/images/400/dreambook_epad_7.jpg" alt="andoid ePad keren" />
<br />
<img src="https://image.made-in-china.com/2f0j00yBoEjlvIMMcC/EPad-7-0-Inch-Touch-Screen-Camera-Tablet-PC-MID.jpg" alt="Android ePad" />
</div>
</div>
</div>

Andi Setiawan

Loving husband - Caring Father - Slap bet Commissionaire (I wish) find my complete profile on: http://andisetiawan.com/about-me http://facebook.com/andiim3 - http://gplus.to/andiim3 - http://andiim3.com

One thought to “Simple Spoiler”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.