Chèn vào Footer
- Code:
<!--controchuot-->
<script type='text/javascript'>var maxheight = $(document).height();$(function(){$.fn.scrollToMiddle=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="maxheight/2"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()=="maxheight/2"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:maxheight/2},"slow")})}});$(function(){$.fn.scrollToBottom=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="maxheight"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()=="maxheight"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:maxheight},"slow")})}});$(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() {$("#toMiddle").scrollToMiddle();$("#toTop").scrollToTop();$("#toBottom").scrollToBottom();});</script><div style="bottom: 25px;clip: inherit;position: fixed;right: 5px;"><a onmouseover="show_tooltip(this,'<font color=#ff0000>Đầu trang</font>','');"><a href="#" id="toTop"><img alt="" border="0" src="http://i34.servimg.com/u/f34/15/44/78/93/top10110.png"></a></a><br><a onmouseover="show_tooltip(this,'<font color=#ff0000>Gữa trang</font>','');"><a href="#" id="toMiddle"><img alt="" border="0" src="http://i34.servimg.com/u/f34/15/44/78/93/middle10.png"></a></a><br><a onmouseover="show_tooltip(this,'<font color=#ff0000>Cuối trang</font>','');"><a href="#" id="toBottom"><img alt="" border="0" src="http://i34.servimg.com/u/f34/15/44/78/93/bottom10.png"></a></a></div> </div>
<!--controchuot-->