SHOW & HIDE BUTTON
- Dashboard >>> Tata Letak >>> Add A Gadget >>> HTML/Javascript
- Copy kode ini :
<center><div
id="spoiler"><div><input value="Click Me"
style="width:150px ;font-size:12px; font-family: delius;
background-image: url(URL BG);-moz-border-radius: 7px; border-radius:
7px;margin:13px;padding:0px;border-style: 2px solid pink;"
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;
text-align: left; background-color:transparent; font-family: delius; font-size:11px;background-repeat:repeat; border-radius:10px;
border: 2px dashed hotpink; background:url(URL BG); margin: 0px;
border-width:2px;padding:3px; width:250px">
Peek a boo!</div></div></div><br />
</center>
Ket:
-- : judul/tulisan pada tombol
-- : URL background
-- : text
-- : warna
-- : font
Labels: ♫ Tutorial, button
<$BlogCommentBody$>
<$BlogCommentDeleteIcon$>