Team:XMU-China/team

From 2014.igem.org

(Difference between revisions)
Line 273: Line 273:
    $(document).ready(function() {
    $(document).ready(function() {
   
   
-
    //先将小图标隐藏
 
    $("#gototop").hide();
    $("#gototop").hide();
-
    //当滚动条的位置于距顶部500px以下时,跳转小图标出现,否则消失
 
$(window).scroll(function(){
$(window).scroll(function(){
if ($(window).scrollTop()>500) {$("#gototop").fadeIn();}
if ($(window).scrollTop()>500) {$("#gototop").fadeIn();}
else {$("#gototop").fadeOut();}
else {$("#gototop").fadeOut();}
});
});
-
    //当点击跳转链接后,回到顶页
 
    $("#gototop").click(function(){
    $("#gototop").click(function(){
  $('body,html').animate({scrollTop:0},500);  
  $('body,html').animate({scrollTop:0},500);  
Line 296: Line 293:
           diffY = document.documentElement.scrollTop;
           diffY = document.documentElement.scrollTop;
         else if (document.body)
         else if (document.body)
-
           diffY = document.body.scrollTop; //获取网页被卷去的高度
+
           diffY = document.body.scrollTop;  
         else
         else
           {/*Netscape stuff*/}
           {/*Netscape stuff*/}
           //alert(diffY);
           //alert(diffY);
-
         percent=.1*(diffY-lastScrollY); //获取滚动的百分比
+
         percent=.1*(diffY-lastScrollY);
         if(percent>0)  
         if(percent>0)  
-
    percent = Math.ceil(percent); //百分比向上类型转换
+
    percent = Math.ceil(percent);
         else   
         else   
-
    percent = Math.floor(percent); //百分比向下类型转换
+
    percent = Math.floor(percent);  
         document.getElementById("gototop").style.top = parseInt(document.getElementById("gototop").style.top)+percent+"px";
         document.getElementById("gototop").style.top = parseInt(document.getElementById("gototop").style.top)+percent+"px";
         lastScrollY = lastScrollY+percent;
         lastScrollY = lastScrollY+percent;
       }
       }
-
         window.setInterval("backTop()",50); //这里的50表示50毫秒执行一次这个函数
+
         window.setInterval("backTop()",50);  
     </script>  
     </script>  
 
 

Revision as of 12:00, 1 October 2014

Team:XMU-China

    Our team

    Group Photo

    Try to click on me in the Picture !

    Team member

Jianxing Huang

sdadsaddsdsadadaddsdasdsadasdsdadadsdadsdsdadeqwesdsadasdwesadaaaczxcsdseqwedasdad weqwdsafadaeqwesdasdadsaddsdsadadaddsdasdsadasdsdadadsdadsdsdadeqwesdsadasdwesadaa aczxcsdseqwedasdadweqwdsafadaeqwesda

Xifeng Guo

daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeewwwwwwwwwwwwwww dsadasddaddwwqeqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq dadwewqweadasdasdasdasdsdewqeqeqeqwe

Chun Tang

daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeewwwwwwwwwwwwwww dsadasddaddwwqeqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq dadwewqweadasdasdasdasdsdewqeqeqeqwe

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang

Chun Tang