Team:Uppsala/Templates/TselectTier2

From 2014.igem.org

(Difference between revisions)
Line 11: Line 11:
             </div>   
             </div>   
-
          <div id="section_selector">
+
         
-
 
+
-
          <div id="tab1">One - content</div>
+
-
    <div id="tab2">Two - content</div>
+
-
    <div id="tab3">Three - content</div>
+
-
    <div id="tab4">Four - content</div>
+
-
 
+
-
 
+
-
</div>
+
-
 
+
-
<script>
+
-
 
+
-
$(document).ready(function() {
+
-
    $("#section_selector div").hide(); // Initially hide all content
+
-
    $("#tabs li:first").attr("id","current"); // Activate first tab
+
-
    $("#section_selector div:first").fadeIn(); // Show first tab content
+
-
   
+
-
    $('#tabs a').click(function(e) {
+
-
        e.preventDefault();       
+
-
        $("#section_selector div").hide(); //Hide all content
+
-
        $("#tabs li").attr("id",""); //Reset id's
+
-
        $(this).parent().attr("id","current"); // Activate this
+
-
        $('#' + $(this).attr('title')).fadeIn(); // Show content for current tab
+
-
    });
+
-
})();
+
-
 
+
-
</script>
+
-
 
+
</html>
</html>

Revision as of 12:38, 16 July 2014