25 September 2011

Tutorial : Spoiler Button

Assalammualaikum

ni tutorial untuk spoiler button . tutorial ni nak sama macam tutorial yang saya pernah dah buat . click sini .yang saya nak buat ni style baru sikit . sebab ada background .


Dashboard > Design > Page Element > Add Gadget > HTML/JAVASCRIPT

<div id="spoiler"><div><input value="Credits" style="width:250px;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%">
text</div></div></div>

 note :
merah - perkataan dekat button
oren - url background button
hijau - isikan apa-apa yang korang nak .

crdit : letthaprincess.blogspot.com

1 ✿:

Anonymous said...

akk , adk share tutor nie keyh . adk credit name akk :) thnks !