Hello Penduduk bumi sekalian :) Dah lama tak buat tutorial. Hehe, asik doodle doodle je..
Sebelum ini saya ada lah buat tuto pasal top button tapi yang itu versi lama punya. >LINK< Ini versi baru pula. Versi baru ni kalau tekan top button dia lambat scroll ke atas. Hee :D Faham tak macam mana??
Dashboard > Design > Edit HTML
Tekan keyboard 'F3' search code </body>
Copy code di bawah ini dan pastekan code ni di bawah code </body>
<a href='#' id='toTop'><img src='url gambar?t=1292762029' style='border:0;'/></a>Emm...... preview la dulu. Ada apa2 eror tak? Kalau tak ada good B-) Okay, jangan save duluuuuuuu!! Ada lagi ni...
Search code ]]></b:skin>
Paste code di bawah ini atas code ]]></b:skin>
/* to top */Kalau gambar korng tak nampak penuhkan, tukarkan yang 100 tau!
#toTop { width:100px;background:none;border:0px solid #ccc;text-align:center;padding:5px;position:fixed;bottom:10px;right:10px;cursor:pointer;color:#666;text-decoration:none; }
Dan akhir sekali....... search lagi code </head>
Dan copy paste code di bawah ni kat atas code </head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
/*-----------------------
* jQuery Plugin: Scroll to Top
* by Craig Wilson, Ph.Creative (http://www.ph-creative.com)
* Bring to you by Zen from http://zenplate.blogspot.com
* Copyright (c) 2009 Ph.Creative Ltd.
* Description: Adds an unobtrusive "Scroll to Top" link to your page with smooth scrolling.
* For usage instructions and version updates to go http://blog.ph-creative.com/post/jquery-plugin-scroll-to-top.aspx
* Do not delete these infomation
* Version: 1.0, 12/03/2009
-----------------------*/
$(function(){$.fn.scrollToTop=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="0"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()=="0"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:0},"slow")})}});
$(function() {
$("#toTop").scrollToTop();
});
</script>
Preview la dulu, ada eror tak? :D
Freebies top button take here :D
Freebies top button take here :D
Kalau tak ada apa-apa, SAVE ^___^
1 comment:
mcm mana nak search code ??
saya buat x leh....kosong je.. :/
Post a Comment