Monday, July 04, 2011

Tutorials : Spoiler Button Show & Hide




Salam 1 Blogger~~

Kali ni nak wat tuto ttg spoiler button...
Nak tau apa itu?

Tengok gambar ni :

Bile tekan butang "Rules" tu...
Jadi macam nie!!


Amacam...nak buat x??

Credits : gambar blog liza

1.Dashboard >> Add Gadget >> HTML/Javasript
2.Copy & paste kod ni :
<div><div style="margin: 5px;">
<div style="margin-bottom: 2px;" class="bigfont"><input style="margin: 0px; padding: 0px; width: 95px; " value="Klik Sini" 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'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Klik Sini'; }" type="button"/>
</div>
<div style="border: 0px inset ; margin: 0px; padding: 6px;" class="alt2">
<div style="display: none;">
Masukkan Code/Gambar/Text Di sini
</div></div></div></div>
3.Save!!

MERAH = Tukar dengan perkataan korang (sebelum dibuka)
HIJAU = Tukar dengan pertakaan korang (Selepas dibuka)
BIRU = Letak kod/gambar/text korang

Selamat Mencuba!!


Dah baca tu...Jangan lupa komen!

1 comment: