- Back to Home »
- Blogger , Tips and Trick »
- Cara Membuat Spoiler Show/Hide
Posted by : Eja Gaming
Minggu, 04 November 2012
1.Login Blogger
2.Tata Letak
3.Tambah Gadget
4.HTML/JavaScript
5.Masukkan HTML berikut
<div><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;"><i><span style="font-weight: bold;">HTML/JavaScript </span></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 class="spoiler" style="border: 1px inset ; margin: 0px; padding: 6px;">
<div style="display: none;">
Isi Spoiler</div></div></div></div>
Note:
- Merah: isi dengan Isi Spoiler
- Hijau: isi dengan Show/Hide atau lainnya
- Biru: isi dengan Judul Spoiler
6.Klik Simpan/Save