Thursday, 5 July 2012

Cara Membuat Tombol Hide/Show

Kali ini saya akan menerangkan bagaimana cara membuat tombol Hide/Show atau yang biasa disebut tombol Spoiler . Sebelum saya menjelaskan cara pembuatan nya silahkan sobat lihat dulu contoh tombol Hide/Show .

Contoh Tombol Hide/Show

alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARwAAABTCAIAAADC7y+6AAAKWklEQVR4nO2du3njOhCF1cEGG2zIUlSEC2AJGzpkASoCoctAKSiFNzjLuSM8BxBEWf7OH+zntUgIBHHmBZC+7ISQqVxe3QFCfhoUFSGToagImQxFRchkKCpCJkNRETIZioqQyVBUhMT4hBCC/XSKipB/hBCcc9779CPvvXPO2A5FRd6SEELkTJxzXf4kYtu2pmyMuqKoyJvhnCvpp8ufCCGEdV2NgrS0T1ERK3M9w1gHtm2rfylCuN427cdTVGQCmKZZCeGjc6TlnDPOfkSGc9vUpzSvl6IiNSzTrrc4NsC6rkadAItUBhSFlikqMggyDbvJf15P7AmPYDEE67oOdGZZluYxFBXJAEXZj0eW9YyeDChq3/fr9Vr5tPfqdGcszo2iIjEDVry3PGCkN+oDzf5fr9cBoW7bVteqQFGRO8biIlQy5vbEsnCUEkJYlqWimTGhrutqlyJFRf5nOC4as/0VeivdIIRwvV4rJw4UJ7z3y7J0nUVRkf8ZU5RzzhgX7Yda6i5oTNvN2Q/J2RvE8QNJHUVF/jFWEnDO1cMtgKgSc/RyudSPHyv3LctSj+vsgR9UPTYgO0VFwFhShKlcn3nwY7K803RrvT2R9uvHbNtmX7x6MD+kqMhIuOW9b4ZGmO7RBL1erxV30dUTlOOakSS0VFcydl3N2h1CUZ0H0gkYwqeulvbSpSjM+6Y2stMdaU/2FExrS8EDw2iM5dCHaMCxj8kdTN8R8tNEhfHC3F0Vj/v0R0BGEXXgSaulvWzb1ptp1I/HxWanaToIQGZ2JULTJsnSW934sixO8ex9VT9EVFh8xIhn933ilizLMpx9DlOK5l/urDDDLG5KchKjG8l+hBWk7EdoWW5NC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L+Xf/g+PPQ8nGQaCOqaWVZKVlTLstxut8go+uf/EaTzSWeqO/Z010989kYb8ggvfkdF1v6lz1Z85xDuEfRl2rO+MPrGc3IOrxRVKRX+8+dPuF9m+dmKgre3X6NlzZ28kBd7qmwqjOUa+/rDm4JiZu824maJgrycF4uqlAp3rT+8KdhbjJ/tF8uawffnJ7z37x35+PjQK912UdFNfX8oqheARTx3v4fYAt3UW0BRnY07Hps3Vs8FZlPvAkV1Ns0H8kuw6PcuUFSn4of+lO1ueC0U+T5QVKcyvCHV+FoB8h2gqE7FDz15ycDvvaCozqY3/HPPeek5eR4U1dl0rUpRUe8IRfUCjLqiot4Uiuo11CsW4XiX6nkdIvOgqF5GUH/sTH7ZfDyRfH8oqhcT7v8oKL3TD4CiImQyFBUhk6GoCJkMRUXIZCgqQiZDUREyGYqKkMlQVIRMhqIiZDIUFSGToagImQxFRchkKCpCJkNRETIZioqQyVBUhEyGoiJkMhQVIZOhqAiZzH++uN5KTHESsgAAAABJRU5ErkJggg==" />


Sobat tertarik untuk membuatnya ? Jika Ya silahkan ikuti langkah - langkah dibawah ini :

1. Sing in akun blogger
2. Klik Rancangan => Tambah Gadget => Pilih HTML/Javascript
3. Masukkan kode dibawah ini

<div><div style="margin: 5px;">
<div style="margin-bottom: 2px;" class="bigfont"><input style="margin: 0px; padding: 0px; width: 95px; " value="Show" 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: 0px inset ; margin: 0px; padding: 6px;" class="alt2">
<div style="display: none;">


Silahkan kalian isi dengan apa yang perlu kalian singkat.

</div></div></div></div>

Keterangan :
   => Warna Merah sobat bisa ganti sesuai dengan keinginan sobat
   => Warna Biru sobat ganti dengan apa yang sobat perlu singkatkan

4. Simpan

Bijaklah dalam berkomentar
EmoticonEmoticon