Website counter
Diberdayakan oleh Blogger.

Join The Community

Premium WordPress Themes Premium WordPress Themes Premium WordPress Themes

Membuat Shoutbox Light Efek

Selamat pagi teman-teman , seperti biasa saya akan share hasil BW yang saya lalkukan seharian . hehe.
Menurut saya sih trik ini cukup menarik. kalo contohnya sudah ada kok tuh liat aja punya saya . gimana anda tertarik atau tidak ? kalo tertarik mari kita lihat langkahnya :


  • masuk ke blogger.com
  • Pilih Rancangan -->Tata Letak --> Tambah Widget --> Html/javascript
  • copy paste kode berikut :




<!-- Start Shoutbox light effect -->

<script>
$(document).ready(function() {
//select all the a tag with name equal to chatbox
$('a[name=chatbox]').click(function(e) {
//Cancel the link behavior
e.preventDefault();
//Get the A tag
var id = $(this).attr('href');
//Get the screen height and width
var tamuchatboxHeight = $(document).height();
var tamuchatboxWidth = $(window).width();
//Set heigth and width to tamuchatbox to fill up the whole screen
$('#tamuchatbox').css({'width':tamuchatboxWidth,'height':tamuchatboxHeight});
//transition effect
$('#tamuchatbox').fadeIn(1000);
$('#tamuchatbox').fadeTo("slow",0.8);
//Get the window height and width
var winH = $(window).height();
var winW = $(window).width();
//Set the popup window to center
$(id).css('top', winH/5-$(id).height()/5);
$(id).css('left', winW/2-$(id).width()/2);
//transition effect
$(id).fadeIn(2000);
});
//if close button is clicked
$('.window .close').click(function (e) {
//Cancel the link behavior
e.preventDefault();
$('#tamuchatbox').hide();
$('.window').hide();
});
//if tamuchatbox is clicked
$('#tamuchatbox').click(function () {
$(this).hide();
$('.window').hide();
});
});
</script>

<style>
a {
    color:#ffffff;
    text-decoration:none
}
img {
    border: none;
}
#tamuchatbox {
    position:absolute;
    left:0;
    top:0;
    z-index:9000;
    background-color:#000;
    display:none;
}
#boxarea .window {
    position:fixed;
    left:0;
    top:0;
    width:440px;
    height:200px;
    display:none;
    z-index:9999;
}
#boxarea #showhide {
    background: #000;
    width:300px;
    height:400px;
    padding:50px 5px 50px 5px;
    border: 1px solid #999;
    -moz-border-radius:15px;
    -khtml-border-radius:15px;
    -webkit-border-radius:15px;
    -moz-box-shadow: 0px 2px 5px 0px #f8f9b9;
}
#tutup {
    padding:10px 0 10px 0;
}
.close {
    background:#999;
    background-position:center;
    padding: 5px 3px 5px 3px;
    color: #FFF;
    border: 0px solid #fff;
    -moz-border-radius:5px;
    -khtml-border-radius:5px;
    -webkit-border-radius:5px;
    -moz-box-shadow: 0px 2px 5px 0px #FF6;
}
</style>

<div id="boxarea">
<!-- Start Shoutbox -->
<div id="showhide" class="window">

<!-- masukkan script buku tamunya disini -->

<div id="tutup"><input type="button" value="Tutup CBox" class="close" />
</div></div><!-- End Shoutbox -->
<div id="tamuchatbox"></div></div>
<!-- End of Shoutbox light effect -->

cara pemanggilannya :

<a href='#showhide' name='chatbox' title='Tulis pesan'>Buku Tamu</a>

silahkan disimpan ditempat yang anda inginkan. sekian dulu trik dari saya jika ada kesulitan silahkan berkomentar .

sumber : http://www.kangdadang.co.cc

1 comments:

http://tanpa-isi.blogspot.com
info yang sangat bermanfaat,, saya test dulu ya

Posting Komentar