Tutorial : Jquery Top Button


Assalamualaikum and annyeonghaseyo. Tuto ni hanya utk pengguna template designer sahaja

1.Dashboard > Design > Edit HTML > Tick Expand Widgets
2.Press Ctrl + f dan cari code </body>
3.Copy code di bawah
<a href='#' id='toTop'><img src='URL IMG?t=1292762029' style='border:0;'/></a>
4.Then paste di atas code </body> tadi.
5.Cari code ni pulak ]]></b:skin>
6.Copy code bawah ni
/* to top */#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; }
7.Paste atas code  ]]></b:skin>
8.Seterusnya , cari code </head>
9.Copy code ni
 <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> 
10.Paste atas code </head> tadi
11.Preview & save
merah : gantikan dgn url top button

http://4.bp.blogspot.com/-e9I8ne-Yag4/Tux2lzTfyLI/AAAAAAAAEi0/txYta_7cqEc/s1600/top-pink+copy.png

http://3.bp.blogspot.com/-oq808x5E06k/Tux27J84NWI/AAAAAAAAEjk/OD3TCfpUAAY/s1600/top-purple.png

http://2.bp.blogspot.com/-EHKb5knpCjk/Tux3CMj7sqI/AAAAAAAAEjs/astyIsjh3Os/s1600/top-blue.png

http://4.bp.blogspot.com/-vYNVyjanc_c/Tux3IjTWmNI/AAAAAAAAEj0/zih1MNtc5Jw/s1600/top-orange.png

http://4.bp.blogspot.com/-cVxT2-p-okA/Tux3JXX-IuI/AAAAAAAAEj8/vh26r1OeTjs/s1600/top-black.png

5 comment [s]:

shaz_rina said...

Thanks Tiqah, cantik :)

Balqis Azzahra Shamsul Anuar said...

terima kasih..

cinta said...

terima kasih...

Sunday said...

Tiqah :) saye amik tuto ni dan letak dalam blog saye . tapi, saye tak re-tutorial . harap tak marah :) dan harap tiqah izin kan :)

EYJA MASLIZA said...

thank you so much darling. tutorial ni je yang menajdi :DDDDD