CSS:
.back_to_top{position:fixed;display:block;right:0;bottom:150px;width:20px;height:48px;background:url(../Nest/img/top.png) no-repeat;z-index:11; overflow:hidden;}
JQuery:
var back_to_top = $("a.back_to_top"); back_to_top.hide(); $(window).scroll(function() { if ($(window).scrollTop() > 100) { back_to_top.fadeIn(1500); } else { back_to_top.fadeOut(1000); } }); back_to_top.click(function() { $($.browser.safari || document.compatMode == 'BackCompat' ? document.body : document.documentElement).animate({ scrollTop: 0 }, 200); return false; });
Html:
<a class="back_to_top" href="javascript:void(0)"></a>