Template:Team:Groningen/sandboxHeader
From 2010.igem.org
(Difference between revisions)
Joelkuiper (Talk | contribs) |
Joelkuiper (Talk | contribs) |
||
(7 intermediate revisions not shown) | |||
Line 27: | Line 27: | ||
<script type="text/javascript" src="http://casualconnect.net/iGEM/jquery.address-1.2.1.min.js"></script> | <script type="text/javascript" src="http://casualconnect.net/iGEM/jquery.address-1.2.1.min.js"></script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
+ | |||
+ | |||
+ | var pages = ["home", "project", "images", "modeling", "team", "contact"]; | ||
+ | |||
function ucfirst(str) { | function ucfirst(str) { | ||
Line 32: | Line 36: | ||
return firstLetter.toUpperCase() + str.substr(1); | return firstLetter.toUpperCase() + str.substr(1); | ||
} | } | ||
- | |||
- | $(function () { | + | $(document).ready(function() { |
- | + | $("ul#topnav li").hover(function() { | |
+ | $(this).css({ 'background' : '#1376c9 url(http://casualconnect.net/iGEM/topnav_active.gif) repeat-x'}); | ||
+ | $(this).find("span").show(); | ||
+ | } , function() { //on hover out... | ||
+ | $(this).css({ 'background' : 'none'}); | ||
+ | $(this).find("span").hide(); | ||
}); | }); | ||
+ | |||
+ | }); | ||
+ | |||
+ | $.address.change(function (event) { | ||
+ | var margin = $(".slide_content").width(); | ||
+ | |||
+ | var page = event.path.substring(1); | ||
+ | if(page == "") { page = 'home'; } | ||
+ | |||
+ | if ($.inArray(page, pages) !== -1) { | ||
+ | margin = (margin * ($.inArray(page, pages))) * -1; | ||
+ | $(".tabslider").stop().animate({ | ||
+ | marginLeft: margin + "px" | ||
+ | }, 300 | ||
+ | ); | ||
+ | } else { | ||
+ | $(".ajaxWrapper").html(""); | ||
+ | var url = wgServer + "/Team:Groningen/" + ucfirst(page) + "?action=render"; | ||
+ | $.get(url, function(data) { | ||
+ | $(".ajaxWrapper").html(data); | ||
+ | margin = (margin * (pages.length)) * -1; | ||
+ | $(".tabslider").css("margin-left", margin + "px"); | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
</script> | </script> | ||
<div id="overallMask"> | <div id="overallMask"> | ||
Line 51: | Line 84: | ||
<div id="tab_nav"> | <div id="tab_nav"> | ||
<ul id="topnav"> | <ul id="topnav"> | ||
- | <li><a href="#">Home</a></li> | + | <li><a href="https://2010.igem.org/Team:Groningen#/home">Home</a></li> |
<li> | <li> | ||
- | <a href="#"> | + | <a href="https://2010.igem.org/Team:Groningen#/project">Project</a> |
<span> | <span> | ||
- | <a href="#"> | + | <a href="#">Biofilm</a> | |
- | <a href="#"> | + | <a href="#">Hydrophobins</a> | |
- | <a href="#"> | + | <a href="#">Applications</a> | |
+ | <a href="#">Lab book</a> | | ||
+ | <a href="#">Biobricks</a> | ||
</span> | </span> | ||
</li> | </li> | ||
<li> | <li> | ||
- | <a href="#"> | + | <a href="https://2010.igem.org/Team:Groningen#/human">Human</a> |
<span> | <span> | ||
- | <a href="#"> | + | <a href="#">Image of Science</a> | |
- | <a href="#"> | + | <a href="#">Human practices</a> | |
- | <a href="#"> | + | <a href="#">Ethics & Safety</a> |
</span> | </span> | ||
</li> | </li> | ||
<li> | <li> | ||
- | <a href="#"> | + | <a href="https://2010.igem.org/Team:Groningen#/modeling">Modelling</a> |
<span> | <span> | ||
- | <a href="#"> | + | <a href="#">Biofilm dynamics</a> | |
- | <a href="#"> | + | <a href="#">Expressions</a> | |
- | <a href="#"> | + | <a href="#">Kill Switch</a> |
- | + | ||
- | + | ||
</span> | </span> | ||
</li> | </li> | ||
- | <li><a href="#">Contact</a></li> | + | <li><a href="https://2010.igem.org/Team:Groningen#/team">Team</a></li> |
+ | <li><a href="https://2010.igem.org/Team:Groningen#/contact">Contact</a></li> | ||
</ul> | </ul> | ||
</div> | </div> |
Latest revision as of 11:03, 20 August 2010