Posted by Prakash timilsina Tuesday, January 5, 2010

Last time i gave you the trick to scroll to top! But this trick was not moving so smoothly, So this time i got the great trick to scroll to top!

First of all find :

Then paste the below code

<script src='' type='text/javascript'></script>
  <script type='text/javascript'>
$(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() {
<a href="#" id="toTop">&uarr; Goto Top </a>

Now find :

Then paste the below code just above the above code:

#toTop { width:80px;background:#F4FFBF;border:1px solid #ccc;text-align:center;padding:5px;position:fixed;bottom:10px;right:10px;cursor:pointer;color:#666;text-decoration:none; }

Thats it ;)
if u have any problem the drop the comment


:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

Goto Top