Tutorial spoiler button
Hai blogger~ sekarang ieqa nak ajar pula macam mana nak buat spoiler button. spoiler button nie sesuai kalau korang nak letak credit, link atau tagboard.
1. Copy kod kat bawah nie.
<center><div id="spoiler"><div><input value="Open/Close" style="width:200px;font-size:12px;background-image: url(Url background);-moz-border-radius: 5px; border-radius: 5px;margin:13px;padding:0px;border-style: 2px solid #ff9fcc;" type="button" 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!'; }" />
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-width:0px; padding:3px; width:90%">
<center>Write anything here</center>
2. Paste kat Edit HTML for classic template or for template designer dkt HTML/Javascript.
3. Preview dan save
biru : tukar ayat tu dengan ayat korg sendiri
oren : URL background
merah : letak text, atau javascript yang korg nak
Post a Comment
Asslamualaikum~
thanks for the comments. no harsh word ok. :)