Tutorial Fly To Top

Wookaai ! Haha, lupa pulak nak buat tutorial malam tadi, asyik dok tengok B1A4 Cut Match Up sampai terlupa nak buat. Maaf >.< Hehe, okay tutorial ini khas untuk BBB yg asyik dok tanya Qay macam mana. Hihi :> Okay, meh saya ajar, meh meh.

1) Dashboard > Template > Edit Template HTML
2) Search code ini ; <head>
3) Copy code ini pulak dan paste selepas code <head> tadi ;

<script language="javascript" src="http://leezy2.webs.com/jquery_mini.js"></script>
<script language="javascript" src="http://leezy2.webs.com/jquery.dimensions.js"></script>
<script language="javascript">
 var name = "#petit";
 var menuYloc = null;

  $(document).ready(function(){
   menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
   $(window).scroll(function () {
    offset = menuYloc+$(document).scrollTop()+"px";
    $(name).animate({top:offset},{duration:500,queue:false});
   });
  });
</script>
4) Then, cari code body { 
5) Copy code ini pulak dan letak atas code body { tadi ;

#petit {
position:absolute;
top:150px;
left:950px;
}
#floating {
box-shadow:0px 0px 5px #af88b8;
font-size:4px;
width:75px;
padding:10px;
background-color:#fff;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
6) Then, cari code <body> 
7) Copy code ini pulak dan paste bawah code <body> tadi ;

<div id="petit"><div id="floating">
<center><a style="color:#333" href="javascript:scroll(0,0)">Fly High !</a></center>
</div></div>
8) Wuuuukaiii, jadilah  ! Preview, dan SAVE !
Next tutorial, FB Like Button (Count)


Comments

Post a Comment

You may criticise (or just don't) as well