Slide show

How to add a simple Back to top button to your blog

A very simple way to add a back to top button to your blog

Paste this code to your gadget:
<!--linap's "Scroll to top">
<style>#totop{display:none; position:fixed; right:3%;bottom:10px;} #totop:hover{cursor:pointer; background:none;} 
<script src='' type='text/javascript'>
<a id="totop"><img src="your image path 80x80 px" width="80px" height="80px" />
<script type='text/javascript'>
$(function(){ $(window).scroll(function(){ if($(this).scrollTop()>200){$("#totop").show()}
else{$("#totop").hide()}}); $("#totop").click(function(){$("body,html").animate({scrollTop:0},700);return false})}); 

Replace your image path 80x80 px  with your image path 

No comments:

Post a Comment