Tuesday, June 7, 2011

Membuat buku tamu tersembunyi

Kawan kali ini saya akan sharekan bagaimana cara membuat buku tamu tersembunyi seperti diblog saya ini. Caranya gimana ya,,? (sabar dulu..)

ikuti langkah di bawah ini :
  • Loggin terlebih dahulu pada blogspot
  • Klik Rancangan > Elemen Laman > Tambah Gadget > HTML/JavaScript
  • Lalu kopas Script d bawah ini 
<style type="text/css">
#at{
position:fixed;
right:600px;
z-index:+1000;
}
* html #at{position:relative;}
.attab{
height:100px;
width:100px;
float:left;
cursor:pointer;
background:url();
}
.atcontent{
float:left;
border:2px solid #ff0000;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjEmtVHg6TORki2l1lnZhnzC-3KNCsaifUqxWJXU7vL693KCHLyfXVvARjwp8RpLmmgp0iqLewlbQ8vTTo_M5TMdzZ8N9YdwKyj5TaLBfOOOcdaVhIQFRQnmYwygzQZDnrBKEOlKZzG2sS/) #000000 repeat-y center;
-moz-border-radius-topleft:15px;
-moz-border-radius-topright:15px;
-moz-border-radius-bottomleft:15px;
-moz-border-radius-bottomright:15px;
padding:10px;
}
</style>
<script type="text/javascript">
function showHideAT(){
var at = document.getElementById("at");
var w = at.offsetWidth;
at.opened ? moveAT(0, -200-w) : moveAT(50-w, 0);
at.opened = !at.opened;
}
function moveAT(x0, xf){
var at = document.getElementById("at");
var dx = Math.abs(x0-xf) > 25 ? 35 : 1;
var dir = xf>x0 ? 1 : -1;
var x = x0 + dx * dir;
at.style.top = x.toString() + "px";
if(x0!=xf){setTimeout("moveAT("+x+", "+xf+")", 10);}
}
</script>
<div id="at">
<div class="attab" onclick="showHideAT()"> </div>
<div class="atcontent">
<div align="center">
<div style="background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXSVEGoMHk22FSCOMVKgvECzJS0wb5enyASEF1o0ip2XU8wTRNmGXr3kHKnoL04M74WUy4yL4GIAsMnR_Ckv1uaGcS4R7GmAZuK91g4UrpI598pE7Sj3CG_V326EY9JkWI52f5YsF8pms/) no-repeat;">


Pasang Buku Tamu Disini

</div>
</div>

<br />
<div align="right"><a href="javascript:void(0);" onclick="showHideAT()"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghyphenhyphen1nFFZSAsAErWyDov9-PuO7MiWmiYUyqEymBbLd3eJvQbrAWfPZ3nLFaCnGgj78BXCH8HTt831P7GgM71RLI1b47_t2ZdEM2aQ7nc9oZMNh6M4uEMOBEDeMb0Vy_VHjz6ETVlyqScHE/" alt="close" title="Click here to Close Cbox" /></a></div>
<div align="left"><font size="2"><a http://exeloph.blogspot.com/2010/10/showhide-cbox-pada-posisi-atas.html"target=_blank"><div style="color: #444444;">
<span >By enda fiVers</span></div></a></font></div>
</div></div>


<script type="text/javascript">
var at = document.getElementById("at");
at.style.top = (-200-at.offsetWidth).toString() + "px";
</script>

  • Save
  • Tambah Gadget lagi untuk tombol yang digunakan mengeluarkan buku tamunya
  • Kopas script di bawah ini

<center><a href="javascript:void(0);"onclick="showHideAT()"/><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiVaydwYU40fZv4dvHYGo7f4wQVOXWtYaPpJUh_sxlbHOzVGIPd_0b2Dx5z3gAEKP7CVm4MWaowUeYdvAibL0ntC1cDqwgJfbEBssChQc9dp6KRtSPHvIuvcJAltu9wcim_E7RnixLd8c/" alt="cbox" title="Click here to open Guest Book" /></a></center>

  • Save
Sudah jadi kawan, untuk background pada tempat buku tamu atau tombolnya dapat diganti sendiri (sudah saya tanda dengan warna Merah).

Semoga bermanfaat kawan...

No comments:

Post a Comment