Template:Team:DukeNB/CSS

From 2014.igem.org

(Difference between revisions)
Line 97: Line 97:
<div class="navleftholder">
<div class="navleftholder">
<ul class="navleft">
<ul class="navleft">
-
   <li><a id="navleftsub1" class="navleftsub" href="#board1">Timeline</a></li>
+
   <li><a id="navleftsub1" class="navleftsub" href="#apr">April</a></li>
-
   <li><a id="navleftsub2" class="navleftsub" href="#board2">Attributions</a></li>
+
   <li><a id="navleftsub2" class="navleftsub" href="#mayjun">May/June</a></li>
-
   <li><a id="navleftsub3" class="navleftsub" href="#board3">Protocols</a></li>
+
   <li><a id="navleftsub3" class="navleftsub" href="#jul">July</a></li>
-
   <li><a id="navleftsub4" class="navleftsub" href="#board4">References</a></li>
+
   <li><a id="navleftsub4" class="navleftsub" href="#aug">August</a></li>
-
   <li><a id="navleftsub5" class="navleftsub" href="#board5">Acknowledgements</a></li>
+
   <li><a id="navleftsub5" class="navleftsub" href="#sept">September</a></li>
</ul></div>
</ul></div>
<script type="text/javascript">
<script type="text/javascript">
$(function(){
$(function(){
-
var board1_top = $("#board1").offset().top;
+
var apr_top = $("#apr").offset().top;
-
var board2_top = $("#board2").offset().top;
+
var mayjun_top = $("#mayjun").offset().top;
-
var board3_top = $("#board3").offset().top;
+
var jul_top = $("#jul").offset().top;
-
var board4_top = $("#board4").offset().top;
+
var aug_top = $("#aug").offset().top;
-
var board5_top = $("#board5").offset().top;
+
var sept_top = $("#sept").offset().top;
//alert(tops);
//alert(tops);
$(window).scroll(function(){
$(window).scroll(function(){
var scroH = $(this).scrollTop();
var scroH = $(this).scrollTop();
var screenH = window.innerHeight * 0.5;
var screenH = window.innerHeight * 0.5;
-
if(scroH>=board5_top- screenH){
+
if(scroH>=sept_top- screenH){
set_cur("#navleftsub5");
set_cur("#navleftsub5");
-
}else if(scroH>=board4_top- screenH){
+
}else if(scroH>=aug_top- screenH){
set_cur("#navleftsub4");
set_cur("#navleftsub4");
-
}else if(scroH>=board3_top- screenH){
+
}else if(scroH>=jul_top- screenH){
set_cur("#navleftsub3");
set_cur("#navleftsub3");
-
}else if(scroH>=board2_top- screenH){
+
}else if(scroH>=mayjun_top- screenH){
set_cur("#navleftsub2");
set_cur("#navleftsub2");
-
}else if(scroH>=board1_top- screenH){
+
}else if(scroH>=apr_top- screenH){
set_cur("#navleftsub1");
set_cur("#navleftsub1");
}
}

Revision as of 17:02, 6 October 2014