Tutorial : Spoiler Button

K-on_2_486_large

Assalamualaikum and annyeonghaseyo. Tutor ni direquest oleh my madu, Auni. LOL. Okay, spoiler button ni sesuai kalau korang nak letak credit, link, ataupon tagboard. Dekat bawah ni contoh spoiler button.


1. Copy code dekat bawah ni
<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(&#39;div&#39;)[&#39;show&#39;].style.display != &#39;&#39;) { this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display = &#39;&#39;; this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;hide&#39;].style.display = &#39;none&#39;; this.innerText = &#39;&#39;; this.value = &#39;Hide Spoiler!&#39;; } else { this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display = &#39;none&#39;; this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;hide&#39;].style.display = &#39;&#39;; this.innerText = &#39;&#39;; this.value = &#39;Show Spoiler!&#39;; }" />
<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 dekat Edit HTML for classic template. For template designer dkt HTML/JavaScript
3. Preview & save

biru : tukar ayat tu dengan ayat korg sendiri
oren : URL background
merah : letak text, atau javascript yang korg nak

6 comment [s]:

Auni Izyan said...

thanks for the tuto ..
err ... kalau untuk tagboard .. letak code cbox tu kat "Write anything here" ek ?

atiqahjaidin said...

@Nur Auni (FTI) : U're welcome :)
yup, letak dekat situ ^^

Auni Izyan said...

akq .. macam mana nak letak spoiler button tu kat bawah ? means .. bukan kat sidebar .. kat bawah ..

atiqahjaidin said...

ermm..cuba letak dkt bawah code < / body >

Auni Izyan said...

err.. akq .. maksud saya .. letak kat bawah .. tepi scrollbar ... ala .. kat tempat top button tu ..

atiqahjaidin said...

erk mcm tu? ermm tak tahu pulak..hehe -,-