Team:Uppsala/Templates/TselectTier3

From 2014.igem.org

(Difference between revisions)
Line 2: Line 2:
<div id="tab_selector">
<div id="tab_selector">
-
                   <ul id="tabs">
+
                   <ul id="tabSection">
                   </ul>
                   </ul>
Line 16: Line 16:
<script>
<script>
var data = window.location.href;
var data = window.location.href;
-
var List = document.getElementById("tabs");
+
var List = document.getElementById("tabSection");
if (data.search("Adhesion") !== -1)
if (data.search("Adhesion") !== -1)
Line 112: Line 112:
a.title = title
a.title = title
node.appendChild(a);
node.appendChild(a);
-
document.getElementById("tabs").appendChild(node);
+
document.getElementById("tabSection").appendChild(node);
}
}
Line 124: Line 124:
$(document).ready(function() {
$(document).ready(function() {
     $("#section_selector div").hide(); // Initially hide all content
     $("#section_selector div").hide(); // Initially hide all content
-
     $("#tabs li:first").attr("id","current"); // Activate first tab
+
     $("#tabSection li:first").attr("id","current"); // Activate first tab
     $("#section_selector div:first").fadeIn(); // Show first tab content
     $("#section_selector div:first").fadeIn(); // Show first tab content
      
      
-
     $('#tabs a').click(function(e) {
+
     $('#tabSection a').click(function(e) {
         e.preventDefault();         
         e.preventDefault();         
         $("#section_selector div").hide(); //Hide all content
         $("#section_selector div").hide(); //Hide all content
-
         $("#tabs li").attr("id",""); //Reset id's
+
         $("#tabSection li").attr("id",""); //Reset id's
         $(this).parent().attr("id","current"); // Activate this
         $(this).parent().attr("id","current"); // Activate this
         $('#' + $(this).attr('title')).fadeIn(); // Show content for current tab
         $('#' + $(this).attr('title')).fadeIn(); // Show content for current tab

Revision as of 13:28, 17 July 2014