Difference between revisions of "Template:BIT-China"

Line 198: Line 198:
 
<script src="https://2016.igem.org/Team:BIT-China/js/basic/jquery-2-0-0?action=raw&ctype=text/javascript"></script>
 
<script src="https://2016.igem.org/Team:BIT-China/js/basic/jquery-2-0-0?action=raw&ctype=text/javascript"></script>
 
<script>
 
<script>
$(document).ready(function(){
 
 
    //拷贝导航栏的副本
 
    var header_nav=$("#home-copy-container").children("").clone();
 
    $("#header-container").append(header_nav);
 
 
 
             //平滑滚动
 
             //平滑滚动
 
             $.scrollTop = function(selector,adjust,time){
 
             $.scrollTop = function(selector,adjust,time){
Line 213: Line 207:
 
                 },time);
 
                 },time);
 
             }
 
             }
 +
//锚点定位
 +
var thisId = window.location.hash;
 +
$.scrollTop(""+thisId,-100,400);
 +
 +
 +
$(document).ready(function(){
 +
 +
    //拷贝导航栏的副本
 +
    var header_nav=$("#home-copy-container").children("").clone();
 +
    $("#header-container").append(header_nav);
 +
 
             //弹出导航监听
 
             //弹出导航监听
 
             window.onscroll = function () {
 
             window.onscroll = function () {

Revision as of 16:19, 19 October 2016

backtop