Posted by Prakash timilsina Thursday, December 31, 2009


If your blog have long post then i suggest you to put "Scroll to top" in your blog or website. This enables your visitors to scroll to the top of your blog's page without scrolling the scrolling button on the mouse.
If you want to add this then Follow the instructions,
# Login to your Blogger > Layout > Edit HTML
# Now Find :
# Now add the below code just after the body tag,

<a href="#" id="backtotop">^ Scroll to Top</a>
  <script src='' type='text/javascript'></script>
  <script type='text/javascript'>
  Scroll to top
  Creator : Prakash Timilsina,

  $(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() {

# Now you have to add some CSS for that, Now find
→Paste the below code just above the above code :

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


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

Post a Comment

Goto Top