Sunday, November 20, 2011

Tutorial: Spoiler Button



Korang nampak tak atas tu ? Namanya spoiler button . So today harini aku nak share tuto macam mana nak buat benda ni . Kalau berminat ikut tuto bawah ni , kalau tak boleh belaaa . Haha garang betul aku ni :p Credit ; Una .

1. Dashboard > Layout > Add Gadget > Choose HTML/Java Script

2. Copy code ni :
<center><div id="spoiler"><div><input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler!'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler!'; }" value="YOUR TITTLE" style="width:200px;font-size:12px;background-image:url(BACKGROUND SPOILER);-moz-border-radius: 25px 10px / 10px 25px; border-radius: 25px 10px / 10px 25px;margin:10px;padding:0px;border-style: 2px solid #FFBABA;" type="button">
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-width:0px; padding:3px; width:98%">
<center>ISI SINI :)</center></div>
<div id="hide"></div>
3. Pastekan dalam ruangan tersebut dan save

Nota Kaki :
ABC : letak tajuk yang korang mahu
ABC : untuk background spoiler korang tuh
ABC : jenis border spoiler tersebut . Kalau korang nak tukar boleh pergi SINI
ABC : isi apa yang patut dalam spoiler  

No comments: