admin [—»Sói™~]-[Ðại Ma Ðầu]
Giới tính : Chinese zodiac : Bài viết : 1042 Xu : 158 Thanked : 650 Sinh Nhật : 20/09/1990 Tham Gia : 15/07/2011 Tuổi : 34 Yahoo : Hà Nội Nghề Nghiệp : Giáo Sư Status : hgfggggggggggggg
Character sheet Tài Sản:
| Tiêu đề: Nút scrool back Sat Aug 27, 2011 8:07 pm | |
| - Code:
-
<script type='text/javascript'>var sheight = $(window).height();var maxheight = $("body").height();$(function(){$.fn.scrollToMiddle=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="maxheight/2-sheight/2"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()=="maxheight/2-sheight/2"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:maxheight/2-sheight/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 href="#" id="toTop"><img alt="Đầu trang" border="0" src="http://r22.imgfast.net/users/2211/12/43/96/album/top10.png"></a><br><a href="#" id="toMiddle"><img alt="Giữa trang" border="0" src="http://r22.imgfast.net/users/2211/12/43/96/album/middle10.png"></a><br><a href="#" id="toBottom"><img alt="Cuối trang" border="0" src="http://r22.imgfast.net/users/2211/12/43/96/album/bottom10.png"></a></div></div> chèn vào header | |
|