Team:SKLBC-China
From 2014hs.igem.org
(Difference between revisions)
Nie1234567 (Talk | contribs) |
Nie1234567 (Talk | contribs) |
||
Line 1: | Line 1: | ||
- | {:Team: | + | <html> |
+ | <head> | ||
+ | <script> | ||
+ | window.onload = function(){ | ||
+ | $.ajax({ | ||
+ | url: "/Team:SYSU-Software/header", | ||
+ | cache: false, | ||
+ | success: function(html){ | ||
+ | $("#navigation").append($(html).find(".row").html()); | ||
+ | var url = window.location.href; | ||
- | + | if(url == "https://2013.igem.org/Team:SYSU-Software") | |
- | + | { | |
- | + | $(".nav-li:first").addClass("active"); | |
- | + | } | |
- | + | else if((url == "https://2013.igem.org/Team:SYSU-Software/overview") || (url == "https://2013.igem.org/Team:SYSU-Software/demo") || | |
- | + | (url == "https://2013.igem.org/Team:SYSU-Software/download") || (url == "https://2013.igem.org/Team:SYSU-Software/part1") || | |
- | + | (url == "https://2013.igem.org/Team:SYSU-Software/part2") || (url == "https://2013.igem.org/Team:SYSU-Software/part3")) | |
- | + | $(".nav-li:eq(1)").addClass("active"); | |
- | + | else if((url == "https://2013.igem.org/Team:SYSU-Software/model") || (url == "https://2013.igem.org/Team:SYSU-Software/notebook")|| (url == "https://2013.igem.org/Team:SYSU-Software/tutorial")) | |
- | + | $(".nav-li:eq(2)").addClass("active"); | |
- | + | else if((url == "https://2013.igem.org/Team:SYSU-Software/require")|| (url == "https://2013.igem.org/Team:SYSU-Software/saft")|| (url == "https://2013.igem.org/Team:SYSU-Software/colla")) | |
- | + | $(".nav-li:eq(3)").addClass("active"); | |
- | + | else if((url == "https://2013.igem.org/Team:SYSU-Software/humanpra")) | |
- | + | $(".nav-li:eq(4)").addClass("active"); | |
- | + | else if((url == "https://2013.igem.org/Team:SYSU-Software/team")) | |
- | + | $(".nav-li:eq(5)").addClass("active"); | |
- | + | } | |
- | + | }); | |
- | + | $.ajax({ | |
- | + | url: "/Team:SYSU-Software/footer", | |
- | + | cache: false, | |
- | + | success: function(html){ | |
- | + | $("footer").append($(html).find("footer").html()); | |
- | + | } | |
- | + | }); | |
- | + | } | |
- | + | ||
- | + | ||
- | + | $(document).ready(function() { | |
- | + | $("#navigation").after("<div id=\"totop\"><span></span></div>"); | |
- | + | var topbtn = $("#totop"); | |
- | + | var lastScroll = 0; | |
- | + | topbtn.css("display", "none"); | |
- | + | window.onscroll = function(){ | |
- | + | var top = $(window).scrollTop(); | |
- | + | if(top > 0){ | |
- | + | topbtn.css("display", ""); | |
- | + | } | |
- | + | if(top == 0){ | |
- | + | topbtn.css("display", "none"); | |
- | + | } | |
- | + | }; | |
- | + | /* topbtn.focus(function(){ */ | |
- | + | /* }); */ | |
- | + | topbtn.click(function(){ | |
- | + | var scrollTop = 0; | |
- | + | var curPos = $(window).scrollTop(); | |
- | + | topbtn.addClass("movingtotop"); | |
- | + | topbtn.addClass("focustop"); | |
- | + | var step = Math.abs(scrollTop - curPos) / 200 ; | |
- | + | var tid = setInterval(function() { | |
- | + | topbtn.toggleClass("movingtotop"); | |
- | + | if (curPos > scrollTop + 14) { | |
- | + | curPos -= step; | |
- | + | step = step * 1.05; | |
- | + | window.scrollTo(0, curPos); | |
- | + | } else if (curPos <= scrollTop + 14){ | |
- | + | window.scrollTo(0, scrollTop); | |
- | + | topbtn.removeClass("movingtotop").removeClass("focustop"); | |
- | + | clearInterval(tid); | |
- | + | } | |
- | + | }, 0.01); | |
- | + | }); | |
- | + | ||
- | + | }); | |
- | + | </script> | |
- | + | <style type="text/css"> | |
- | + | #p-logo,#search-controls,.firstHeading,#top,#footer-box,#catlinks | |
- | + | { display:none; } | |
- | + | ||
- | + | #globalWrapper { | |
- | + | padding-bottom:0; top:0px;} | |
- | + | ||
- | + | #top-section{ | |
- | + | height:0px; | |
- | + | border:none; | |
- | + | width:100%; } | |
- | + | ||
- | + | #content{ | |
- | + | width:100%; | |
- | + | border-left:none; border-right: none; | |
- | + | padding:1px 0px 0px 0px!important; | |
- | + | ||
- | + | } | |
- | + | ||
- | + | #menubar{ | |
- | + | width:510px; | |
- | + | top:-1px; | |
- | + | } | |
- | + | ||
- | + | .right-menu li a{ | |
- | + | background-color:white; | |
- | + | color:black; | |
- | + | text-decoration:none; | |
- | + | } | |
- | + | ||
- | + | .right-menu li a:hover{ | |
- | + | text-decoration:none; | |
- | + | } | |
- | + | ||
- | + | .left-menu li a{ | |
- | + | text-decoration:none; | |
- | + | } | |
- | + | .left-menu li a:hover{ | |
- | + | text-decoration:none; | |
- | + | } | |
- | + | ||
- | + | ul,li{ list-style:none; } | |
- | + | </style> | |
- | + | </head> | |
- | + | <body> | |
- | + | </body> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</html> | </html> |
Revision as of 15:36, 28 May 2014