Tutorial : Shoutbox Macam Hadifah

Assalamualaikum ^^!

Hari ni hadifah nk buat tuto yg di request oleh si cadburry .. rasenye shoutbox mcm hadifah tu kot.. ntah :9..okey jap! sebelum tu nk kredit kan dekat wan hazel..

Okey jom!

add a gadget ==> html java script ==> copy kod ni


<style type='text/css'>
a.linkopacity img {
filter:alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
-khtml-opacity: 0.5;}
a.linkopacity:hover img {
filter:alpha(opacity=100);
-moz-opacity: 1.0;
opacity: 1.0;
-khtml-opacity: 1.0; }
</style>
<div style='display:scroll; position:fixed; top:0px; right:-0px;'>
<br />
<br />

<!-- Start Ajax Popup Shoutbox by -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script>
$(document).ready(function() {
//select all the a tag with name equal to modal
$('a[name=modal]').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 maskHeight = $(document).height();
var maskWidth = $(window).width();


//Set heigth and width to mask to fill up the whole screen
$('#mask').css({'width':maskWidth,'height':maskHeight});






//Get the window height and width
var winH = $(window).height();
var winW = $(window).width();


//Set the popup window to center
$(id).css('top', winH/2-$(id).height()/2);
$(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();


$('#mask').hide();
$('.window').hide();
});


//if mask is clicked
$('#mask').click(function () {
$(this).hide();
$('.window').hide();
});


});
</script>
<style>
img { border: none; }
#mask {
position:absolute;
left:0;
top:0;
z-index:9000;
background-color:#000;
display:none;
}


#boxes .window {
position:fixed;
left:0;
top:0;
width:440px;
height:200px;
display:none;
z-index:9999;
padding:20px;
}
#boxes #wanhazelshoutbox {
background:url(BACKGROUND KORANG) no-repeat 0 0 transparent;
width:380px;
height:415px;
padding:65px 0 20px 50px;
}
#closesb {
padding:2px 0 0 0;
}
#author {
padding:8px 0 0 168px;
}
</style>
<ul><center> <a href="#wanhazelshoutbox" name="modal"><img src="http://i.imgur.com/TddW0.png" border="0" /></a> </center> </ul>
<div id="boxes">
<!-- Start Shoutbox -->
<div id="wanhazelshoutbox" class="window">
<!-- Begin ShoutMix - http://www.shoutmix.com --><center>
Masukkan kod shoutbox korang dgn width 270 dan height 280

</center>
<!-- End ShoutMix -->
<div id="author">
</div><center><div id="closesb"><input type="button" value="Close" class="close" />
</div></center></div><!-- End of Ajax Shoutbox -->
<!-- Mask to cover the whole screen -->
<div id="mask"></div></div>
<!-- End of Ajax Popup Shoutbox-->

</div>

Nota :
  • ABC
  • -url background korang..kalau nk tekan sini
  • ABC-url icon kat tepi tu..kalau nk tekan sini..kalau tak nk,tak yah ubah lah :P
  • ABC-Kod shoutbox korang
  • ABC-Widht 270 Height 280 

Actually,hadfah pon tak berapa paham.. hadifah suruh kak nabila yg buat..hadifah tempah url background yg ni
ngeh3 -,-

Kalau x berape paham tuto ni,boleh gi sini 

3 comments:

  1. Thnks Difah :) Widht ngan height nak tulis ape yee

    ReplyDelete
  2. @Si Cadburry kalau shoutbox akak tu widht die 200,tukar 270..kalau height akak 400,tukar kpd 400..

    ReplyDelete
  3. Thnks Difah :) Widht ngan height nak tulis ape yee

    ReplyDelete

Tekan "publish" sekali je tau

Terima kasih komen

BUDI BAHASA BUDAYA KITA :)