m (解决路径问题。) |
m (解决路径问题。) |
||
Line 7: | Line 7: | ||
{ | { | ||
"name": "Description", | "name": "Description", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Description | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Description" |
}, | }, | ||
{ | { | ||
"name": "Design", | "name": "Design", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Design | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Design" |
}, | }, | ||
{ | { | ||
"name": "Demonstrate", | "name": "Demonstrate", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Demonstrate | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Demonstrate" |
}, | }, | ||
{ | { | ||
"name": "Experiments", | "name": "Experiments", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Experiments | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Experiments" |
}, | }, | ||
{ | { | ||
"name": "InterLab", | "name": "InterLab", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/InterLab | + | "link": "https://2018.igem.org/Team:DLUT_China_B/InterLab" |
}, | }, | ||
{ | { | ||
"name": "Notebook", | "name": "Notebook", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Notebook | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Notebook" |
} | } | ||
] | ] | ||
Line 36: | Line 36: | ||
{ | { | ||
"name": "Parts Overview", | "name": "Parts Overview", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/PartsOverview | + | "link": "https://2018.igem.org/Team:DLUT_China_B/PartsOverview" |
}, | }, | ||
{ | { | ||
"name": "Basic Parts", | "name": "Basic Parts", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/BasicParts | + | "link": "https://2018.igem.org/Team:DLUT_China_B/BasicParts" |
}, | }, | ||
{ | { | ||
"name": "Composite Parts", | "name": "Composite Parts", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/CompositeParts | + | "link": "https://2018.igem.org/Team:DLUT_China_B/CompositeParts" |
} | } | ||
] | ] | ||
Line 53: | Line 53: | ||
{ | { | ||
"name": "Condition Optimization", | "name": "Condition Optimization", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/ConditionOptimization | + | "link": "https://2018.igem.org/Team:DLUT_China_B/ConditionOptimization" |
}, | }, | ||
{ | { | ||
"name": "Standard Curve", | "name": "Standard Curve", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/StandardCurve | + | "link": "https://2018.igem.org/Team:DLUT_China_B/StandardCurve" |
}, | }, | ||
{ | { | ||
"name": "Result", | "name": "Result", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Result | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Result" |
} | } | ||
] | ] | ||
Line 70: | Line 70: | ||
{ | { | ||
"name": "Applied Design", | "name": "Applied Design", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/AppliedDesign | + | "link": "https://2018.igem.org/Team:DLUT_China_B/AppliedDesign" |
}, | }, | ||
{ | { | ||
"name": "Hardware", | "name": "Hardware", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Hardware | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Hardware" |
}, | }, | ||
{ | { | ||
"name": "Software", | "name": "Software", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Software | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Software" |
} | } | ||
] | ] | ||
Line 87: | Line 87: | ||
{ | { | ||
"name": "Human Practice", | "name": "Human Practice", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/HumanPractice | + | "link": "https://2018.igem.org/Team:DLUT_China_B/HumanPractice" |
}, | }, | ||
{ | { | ||
"name": "Education", | "name": "Education", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Education | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Education" |
} | } | ||
] | ] | ||
Line 100: | Line 100: | ||
{ | { | ||
"name": "Team Members", | "name": "Team Members", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/TeamMembers | + | "link": "https://2018.igem.org/Team:DLUT_China_B/TeamMembers" |
}, | }, | ||
{ | { | ||
"name": "Attributions", | "name": "Attributions", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Attributions | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Attributions" |
}, | }, | ||
{ | { | ||
"name": "Collaboration", | "name": "Collaboration", | ||
− | "link": "https://2018.igem.org/Team:DLUT_China_B/Collaboration | + | "link": "https://2018.igem.org/Team:DLUT_China_B/Collaboration" |
} | } | ||
] | ] |
Revision as of 13:22, 18 September 2018
/*导航栏*/ let nav = document.getElementById("nav"); let navData = [
{ "menu": "Project", "subMenu": [ { "name": "Description", "link": "https://2018.igem.org/Team:DLUT_China_B/Description" }, { "name": "Design", "link": "https://2018.igem.org/Team:DLUT_China_B/Design" }, { "name": "Demonstrate", "link": "https://2018.igem.org/Team:DLUT_China_B/Demonstrate" }, { "name": "Experiments", "link": "https://2018.igem.org/Team:DLUT_China_B/Experiments" }, { "name": "InterLab", "link": "https://2018.igem.org/Team:DLUT_China_B/InterLab" }, { "name": "Notebook", "link": "https://2018.igem.org/Team:DLUT_China_B/Notebook" } ] }, { "menu": "Parts", "subMenu": [ { "name": "Parts Overview", "link": "https://2018.igem.org/Team:DLUT_China_B/PartsOverview" }, { "name": "Basic Parts", "link": "https://2018.igem.org/Team:DLUT_China_B/BasicParts" }, { "name": "Composite Parts", "link": "https://2018.igem.org/Team:DLUT_China_B/CompositeParts" } ] }, { "menu": "Model", "subMenu": [ { "name": "Condition Optimization", "link": "https://2018.igem.org/Team:DLUT_China_B/ConditionOptimization" }, { "name": "Standard Curve", "link": "https://2018.igem.org/Team:DLUT_China_B/StandardCurve" }, { "name": "Result", "link": "https://2018.igem.org/Team:DLUT_China_B/Result" } ] }, { "menu": "Awards", "subMenu": [ { "name": "Applied Design", "link": "https://2018.igem.org/Team:DLUT_China_B/AppliedDesign" }, { "name": "Hardware", "link": "https://2018.igem.org/Team:DLUT_China_B/Hardware" }, { "name": "Software", "link": "https://2018.igem.org/Team:DLUT_China_B/Software" } ] }, { "menu": "Human Practice", "subMenu": [ { "name": "Human Practice", "link": "https://2018.igem.org/Team:DLUT_China_B/HumanPractice" }, { "name": "Education", "link": "https://2018.igem.org/Team:DLUT_China_B/Education" } ] }, { "menu": "Team", "subMenu": [ { "name": "Team Members", "link": "https://2018.igem.org/Team:DLUT_China_B/TeamMembers" }, { "name": "Attributions", "link": "https://2018.igem.org/Team:DLUT_China_B/Attributions" }, { "name": "Collaboration", "link": "https://2018.igem.org/Team:DLUT_China_B/Collaboration" } ] }
]; let ul = document.createElement("ul"); ul.setAttribute("class", "menu"); for (let i = 0; i < navData.length; ++i) {
let menu = document.createElement("li"); let menuName = document.createElement("a"); menuName.innerText = navData[i]["menu"]; let subMenu = document.createElement("ul"); subMenu.setAttribute("class", "subMenu"); for (let j = 0; j < navData[i]["subMenu"].length; ++j) { let subMenuName = document.createElement("li"); let subMenuNameA = document.createElement("a"); subMenuNameA.innerText = navData[i]["subMenu"][j]["name"]; subMenuNameA.setAttribute("href", navData[i]["subMenu"][j]["link"]); subMenuName.appendChild(subMenuNameA); subMenu.appendChild(subMenuName); } menu.appendChild(menuName); menu.appendChild(subMenu); ul.appendChild(menu);
} document.getElementById('nav').appendChild(ul);
/*至顶按钮*/ $('#back').click(function () {
$('html').animate( {scrollTop: 0}, 500);
}); document.onscroll=function () {
if($('html').scrollTop()>600) document.getElementById("back").style.display="block"; else document.getElementById("back").style.display="none";
};