Membuat Simple Spoiler Blogger

Bikin Spoler sederhana kayak yang biasa dipake di Kaskus.us di blogger tu isa pa gag? Bisa koq, Buktinya banyak yang pake khan?? Spoiler tuh apaan sih? Gag tau spoiler? Tuh Tombol yang biasa ada tulisan "Buka", trus kalo diklik langsung munculin isi widget dibawahnya. Trus isa ditutup lagi. Contohnya kayak gini nih:
[ISI SPOILER KAMU!!!]
Nenek Genit


Nah, Buat spoiler kayak gitu cukup sederhana aja, ne Codenya:

<div style="margin: 5px 20px 20px;"><div style="margin-bottom: 2px;">
<input value="BUKAIN DONK!" style="text-align: center; margin: 0px; padding: 0px; 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 = 'TUTUP AH!'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'BUKA LAGI DUMZ'; }" type="button"> </div><br />
<div style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display:none;">[ISI SPOILER KAMU]</div></div></div>
Comments

1 comment:

Related posts
Guestbook
Author


© 2008 - 2016 DickeyMaru
Blogger Template Win 8 design by Dark Ard from DeezClan | All rights reversed.
  • Post
  • Comments
  • Related
  • Guestbook
  • Author
  • Other