posted on Saturday, December 3, 2011
| [1]
oke . sambung tutorial nak ?
wehee~ jom . jom . faz nak ajar pengguna blogskin sekalian utk buat
button back to top .
# tu pun kalau ade yang nak buat la :(
jom . faz ajar ye ?
1. Dashboard > Template > edit template HTML2. cari code ni <head>3. then copy code ni 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 pulak code body {5. copy code ni then paste kat atas code body { tu
#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 . last but not least , cari code <body>7. copy code ni then 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. oke . ce preview . jadi ? save :D
Saya cuba copy awak punya tapi tak bleh nak tkan copy
Post a Comment