Difference between revisions of "Template:China Tongji Head"
Line 120: | Line 120: | ||
</div> | </div> | ||
<div class="nav"> | <div class="nav"> | ||
− | + | <a class="navOneA" id="Home" href="https://2015.igem.org/Team:China_Tongji"><div class="navOne" id="divHome">Home</div></a> | |
− | + | <a class="navOneA" id="Project" href="https://2015.igem.org/Team:China_Tongji/Project"><div class="navOne" id="divProject">Project <img src="https://static.igem.org/mediawiki/2015/0/07/China_Tongji_2015_dropdown_arrow.png"></a> | |
<div class="navDrop"> | <div class="navDrop"> | ||
− | <li class="navTwo" id="navOverview" | + | <a><li class="navTwo" id="navOverview">Overview</li></a> |
− | <li class="navTwo" id="navBackground" | + | <a><li class="navTwo" id="navBackground">Background</li></a> |
− | <li class="navTwo" id="navDesign" | + | <a><li class="navTwo" id="navDesign">Design</li></a> |
− | <li class="navTwo" id="navProtocol" | + | <a><li class="navTwo" id="navProtocol">Protocol</li></a> |
− | <li class="navTwo" id="navSummaryResult" | + | <a><li class="navTwo" id="navSummaryResult">Summary and Result</li></a> |
</div> | </div> | ||
</div> | </div> | ||
Line 166: | Line 166: | ||
<!-- --------------- script code --------------- --> | <!-- --------------- script code --------------- --> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | jQuery(document).ready(function($){ | + | jQuery(document).ready(function($){ |
+ | //--------单击二级标题时,动态定位到页面指定位置-----------// | ||
+ | //Project二级标题 | ||
$('#navOverview').click(function(){$('html,body').animate({scrollTop: $('#Overview').offset().top-78}, 800);}); | $('#navOverview').click(function(){$('html,body').animate({scrollTop: $('#Overview').offset().top-78}, 800);}); | ||
$('#navBackground').click(function(){$('html,body').animate({scrollTop: $('#Background').offset().top-78}, 800);}); | $('#navBackground').click(function(){$('html,body').animate({scrollTop: $('#Background').offset().top-78}, 800);}); | ||
Line 172: | Line 174: | ||
$('#navProtocol').click(function(){$('html,body').animate({scrollTop: $('#Protocol').offset().top-78}, 800);}); | $('#navProtocol').click(function(){$('html,body').animate({scrollTop: $('#Protocol').offset().top-78}, 800);}); | ||
$('#navSummaryResult').click(function(){$('html,body').animate({scrollTop: $('#SummaryResult').offset().top-78}, 800);}); | $('#navSummaryResult').click(function(){$('html,body').animate({scrollTop: $('#SummaryResult').offset().top-78}, 800);}); | ||
− | + | //Notebook二级标题 | |
$('#navRecord').click(function(){$('html,body').animate({scrollTop: $('#Record').offset().top-78}, 800);}); | $('#navRecord').click(function(){$('html,body').animate({scrollTop: $('#Record').offset().top-78}, 800);}); | ||
$('#navTimeline').click(function(){$('html,body').animate({scrollTop: $('#Timeline').offset().top-78}, 800);}); | $('#navTimeline').click(function(){$('html,body').animate({scrollTop: $('#Timeline').offset().top-78}, 800);}); | ||
− | + | //Achivement二级标题 | |
$('#navParts').click(function(){$('html,body').animate({scrollTop: $('#Parts').offset().top-78}, 800);}); | $('#navParts').click(function(){$('html,body').animate({scrollTop: $('#Parts').offset().top-78}, 800);}); | ||
$('#navEquipment').click(function(){$('html,body').animate({scrollTop: $('#Equipment').offset().top-78}, 800);}); | $('#navEquipment').click(function(){$('html,body').animate({scrollTop: $('#Equipment').offset().top-78}, 800);}); | ||
$('#navModeling').click(function(){$('html,body').animate({scrollTop: $('#Modeling').offset().top-78}, 800);}); | $('#navModeling').click(function(){$('html,body').animate({scrollTop: $('#Modeling').offset().top-78}, 800);}); | ||
$('#navJudgingForm').click(function(){$('html,body').animate({scrollTop: $('#JudgingForm').offset().top-78}, 800);}); | $('#navJudgingForm').click(function(){$('html,body').animate({scrollTop: $('#JudgingForm').offset().top-78}, 800);}); | ||
− | + | //Team二级标题 | |
$('#navMembers').click(function(){$('html,body').animate({scrollTop: $('#Members').offset().top-78}, 800);}); | $('#navMembers').click(function(){$('html,body').animate({scrollTop: $('#Members').offset().top-78}, 800);}); | ||
$('#navAdvisor').click(function(){$('html,body').animate({scrollTop: $('#Advisor').offset().top-78}, 800);}); | $('#navAdvisor').click(function(){$('html,body').animate({scrollTop: $('#Advisor').offset().top-78}, 800);}); | ||
Line 186: | Line 188: | ||
$('#navSponsor').click(function(){$('html,body').animate({scrollTop: $('#Sponsor').offset().top-78}, 800);}); | $('#navSponsor').click(function(){$('html,body').animate({scrollTop: $('#Sponsor').offset().top-78}, 800);}); | ||
$('#navContact').click(function(){$('html,body').animate({scrollTop: $('#Contact').offset().top-78}, 800);}); | $('#navContact').click(function(){$('html,body').animate({scrollTop: $('#Contact').offset().top-78}, 800);}); | ||
− | + | //Outreach二级标题 | |
$('#navHumanPractice').click(function(){$('html,body').animate({scrollTop: $('#HumanPractice').offset().top-78}, 800);}); | $('#navHumanPractice').click(function(){$('html,body').animate({scrollTop: $('#HumanPractice').offset().top-78}, 800);}); | ||
$('#navCollaboration').click(function(){$('html,body').animate({scrollTop: $('#Collaboration').offset().top-78}, 800);}); | $('#navCollaboration').click(function(){$('html,body').animate({scrollTop: $('#Collaboration').offset().top-78}, 800);}); |
Revision as of 19:07, 28 August 2015