Team:SJTU-Software2/test

From 2014.igem.org

(Difference between revisions)
Line 450: Line 450:
</div>
</div>
</div>
</div>
-
     <p id="back-to-top"><a href="#top"><span><img src="https://static.igem.org/mediawiki/2014/c/cc/Sjtu_software_teamlogo.png" alt="" /></span>back to top</a></p>
+
      
-
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
+
-
<script>
+
-
$(function(){
+
-
        //当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失
+
-
        $(function () {
+
-
            $(window).scroll(function(){
+
-
                if ($(window).scrollTop()>10){
+
-
                    $("#back-to-top").fadeIn(1500);
+
-
                }
+
-
                else
+
-
                {
+
-
                    $("#back-to-top").fadeOut(1500);
+
-
                }
+
-
            });
+
-
 
+
-
            //当点击跳转链接后,回到页面顶部位置
+
-
 
+
-
            $("#back-to-top").click(function(){
+
-
                $('body,html').animate({scrollTop:0},1000);
+
-
                return false;
+
-
            });
+
-
        });
+
-
    });
+
-
</script>
+
-
 
+

Revision as of 07:47, 12 October 2014


    • Messages
    • User Controls
    • Screen Settings
    • Search

SJTU-Software


Shanghai Jiao Tong University


800, Dongchuan Road


200240 Shanghai, China