Monday, December 12, 2011

Tutorial: JQuezy Top Button

Harini aku nak share tuto dgn korang macam mana nak buat jquezy top button . Ini lebih canggih lagi berbanding yang lain . Bila korang tekan je automatik dia akan naik atas . Mau ? Follow step kat bawah .

1 Dashboard > Design > Edit HTML > Tick Expand Widget Template

2 Search code ni
3 Copy pula code di bawah and paste ATAS/SEBELUM code yg korang cari tu
<a href='#' id='toTop'><img src='URL GAMBAR' style='border:0;'/></a>
4 Next , cari code ni pula
 Copy code ni and pastekan ATAS/SEBELUM code di atas tu
/* 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; }
 Now , search pula code ni
 Copy code dalam kotak ni dan pastekan SEBELUM code korang cari tu

<script src='' type='text/javascript'/>
<script type='text/javascript'>
* jQuery Plugin: Scroll to Top 
* by Craig Wilson, Ph.Creative ( 
* Bring to you by Zen from 
* Copyright (c) 2009 Ph.Creative Ltd. 
* Description: Adds an unobtrusive &quot;Scroll to Top&quot; link to your page with smooth scrolling. 
* For usage instructions and version updates to go 
* Do not delete these infomation 
* Version: 1.0, 12/03/2009 

$(function(){$.fn.scrollToTop=function(){$(this).hide().removeAttr(&quot;href&quot;);if($(window).scrollTop()!=&quot;0&quot;){$(this).fadeIn(&quot;slow&quot;)}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()==&quot;0&quot;){$(scrollDiv).fadeOut(&quot;slow&quot;)}else{$(scrollDiv).fadeIn(&quot;slow&quot;)}});$(this).click(function(){$(&quot;html, body&quot;).animate({scrollTop:0},&quot;slow&quot;)})}}); 

$(function() { 


8 Preview and save template !

No comments: