Difference between revisions of "Template:ETH Zurich"

m
m
Line 10: Line 10:
 
<script type="text/javascript" src="https://2015.igem.org/Template:ETH_Zurich/injectHTML.js?action=raw&ctype=text/javascript"></script>
 
<script type="text/javascript" src="https://2015.igem.org/Template:ETH_Zurich/injectHTML.js?action=raw&ctype=text/javascript"></script>
 
<!--<script type="text/javascript" src="https://2015.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
 
<!--<script type="text/javascript" src="https://2015.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
 +
<script type="text/javascript" src="https://2015.igem.org/Template:ETH_Zurich/scroll_highlight.js?action=raw&ctype=text/javascript"></script>
  
 
<script type="text/javascript" src="https://2015.igem.org/Template:ETH_Zurich/getElements.js?action=raw&ctype=text/javascript"></script>
 
<script type="text/javascript" src="https://2015.igem.org/Template:ETH_Zurich/getElements.js?action=raw&ctype=text/javascript"></script>
Line 106: Line 107:
 
     });
 
     });
 
   }
 
   }
});
 
 
/* Use this to highlight current heading */
 
$(window).scroll(function(){
 
/* inspired by http://jsfiddle.net/8n06pvy9/9/ */
 
 
var windowPos = $(window).scrollTop();
 
$('#sidemenu li a[href^="#"]').each(function() {
 
 
            var currentLink = $(this);
 
if ($(currentLink.attr("href")).length > 0)
 
                {
 
                var refElement = $(currentLink.attr("href"));
 
                if (refElement.position().top <= windowPos && (refElement.position().top + refElement.height() + $("#sidemenu").height() ) > windowPos) {
 
                    $('#sidemenu li a').removeClass("current");
 
                    currentLink.addClass("current");
 
                }
 
                else{
 
                    currentLink.removeClass("current");
 
                }
 
            }
 
});
 
 
 
 
});
 
});
  

Revision as of 17:57, 19 August 2015

We would like to thank our sponsors