Team:TU Munich/lab/notebook
From 2011.igem.org
(Difference between revisions)
Line 61: | Line 61: | ||
<div id="tabs" class="ui-tabs ui-widget ui-widget-content" style="float:right;width:700px;"> | <div id="tabs" class="ui-tabs ui-widget ui-widget-content" style="float:right;width:700px;"> | ||
- | <ul class="ultopic"> | + | <ul class="ultopic tabNavigation"> |
<li class="litopic ui-corner-all" title="labbookContent"><a href="https://2011.igem.org/Team:TU_Munich/lab/notebook/solidmatrix?action=raw">Solid Matrix Experiments</a></li> | <li class="litopic ui-corner-all" title="labbookContent"><a href="https://2011.igem.org/Team:TU_Munich/lab/notebook/solidmatrix?action=raw">Solid Matrix Experiments</a></li> | ||
<li class="litopic ui-corner-all" title="labbookContent"><a href="https://2011.igem.org/Team:TU_Munich/lab/notebook/part1?action=raw">Labbook Part 1</a></li> | <li class="litopic ui-corner-all" title="labbookContent"><a href="https://2011.igem.org/Team:TU_Munich/lab/notebook/part1?action=raw">Labbook Part 1</a></li> |
Revision as of 11:05, 14 September 2011
$(function () { var tabContainers = $('div.tabs > div'); $('div.tabs ul.tabNavigation a').click(function () { tabContainers.hide().filter(this.hash).show(); $('div.tabs ul.tabNavigation a').removeClass('selected'); $(this).addClass('selected'); return false; }).filter(':first').click(); }); $(function () { var tabs = []; var tabContainers = []; $('ul.tabs a').each(function () { // note that this only compares the pathname, not the entire url // which actually may be required for a more terse solution. if (this.pathname == window.location.pathname) { tabs.push(this); tabContainers.push($(this.hash).get(0)); } }); $(tabs).click(function () { // hide all tabs $(tabContainers).hide().filter(this.hash).show(); // set up the selected class $(tabs).removeClass('selected'); $(this).addClass('selected'); return false; }); });