Monday, August 6, 2012

Tutorial : Button Show Hide

Tumblr_m6yzd0tfsz1rum37jo1_500_large
Tutorial ni di re-quest oleh adik farah . Ok kalau siapa ynag tak tau lagi button show hide ,meh atin cakap sikit . button ni bila click je button tu nanti kluar apa2 kat bawahnye .. Kalau dah faham tak pe, kalau ada yang belum tahu tu . bawah ni atin tunjuk contoh :

Before:


After click:



BLOGSKIN

 Dashboard > Template > Edit HTML
 Copy code bawah ni:
<center><div id="spoiler"><div><input value="TAJUK" style="width:200px ;font-size:12px;background-image: url(URL BACKGROUND);-moz-border-radius: 10px; border-radius: 10px;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><center>
AYAT KORANG ATAU LINK APA2 JE !!
</center></center></div></div></div></center> 
 Paste kat bahagian sideber atau mana2 yang korang suka k .
 Review and Save


 ..............................................................................................................................



DESIGN

 Design > Add a Gadget > Html/JavaScript
 Copy code bawah ni :

<center><div id="spoiler"><div><input value="TAJUK" style="width:200px ;font-size:12px;background-image: url(URL BACKGROUND);-moz-border-radius: 10px; border-radius: 10px;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><center>
AYAT KORANG ATAU LINK APA2 JE !!</center></center></div></div></div></center> 
 Paste kan dalam Html/Javacsript tu
 Review and Save


hijau : tajuk show
oren : lebar button
biru : background untuk button
merah : ayat korang atau ape2 link

3 comments:

farah izzlyn said...

gomawo buatkn tuto ni :) nasib baik yg ni farah buat jadik . hehe .

Atin Tory said...

@farah : hihi anieyo :D

Farah Arina said...

thanks for the tuto :D