Template:Paris2009 menu6
From 2009.igem.org
(Difference between revisions)
Christophe.R (Talk | contribs) |
Christophe.R (Talk | contribs) |
||
Line 1: | Line 1: | ||
<div id="menu2"> | <div id="menu2"> | ||
- | <html> | + | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
<head> | <head> | ||
- | <style type="text/css"> | + | <title>Menu accordéon avec jQuery</title> |
- | + | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
- | + | <style type="text/css"> | |
+ | |||
+ | #navigation { | ||
width: 110px; | width: 110px; | ||
margin: 20px 13px 0 7px; | margin: 20px 13px 0 7px; | ||
- | |||
float: left; | float: left; | ||
- | padding: | + | padding:0px; |
list-style: none; | list-style: none; | ||
+ | border-width: 0px; | ||
} | } | ||
- | + | ||
- | + | #navigation a, #navigation span { | |
- | + | display:block; | |
- | + | width: 110px; | |
- | list-style | + | color: #000; |
- | + | list-style: none; | |
- | + | background:url(https://static.igem.org/mediawiki/2009/7/7c/Menu_Paris.png) | |
+ | border-width: 0px; | ||
} | } | ||
- | + | ||
- | + | #navigation .toggleSubMenu a, #navigation .toggleSubMenu span { | |
list-style: none; | list-style: none; | ||
- | padding: 0; | + | text-align:center; |
+ | border-width: 0px; | ||
+ | padding:0px; | ||
+ | margin:0px; | ||
+ | } | ||
+ | |||
+ | #navigation .open a, #navigation .open span { | ||
+ | list-style: none; | ||
+ | padding:0; | ||
margin:0; | margin:0; | ||
- | + | border-width: 0px; | |
+ | |||
} | } | ||
- | + | ||
- | + | #navigation a:hover, #navigation a:focus, #navigation a:active { | |
- | + | font-weight:bold; | |
- | + | color: #000; | |
+ | list-style: none; | ||
+ | padding:0; | ||
+ | margin:0; | ||
+ | border-width: 0px; | ||
} | } | ||
- | + | ||
- | + | #navigation .subMenu { | |
- | + | background: url(https://static.igem.org/mediawiki/2009/7/7c/Menu_Paris.png)repeat; | |
- | + | margin: 0px; | |
- | background: url(https://static.igem.org/mediawiki/2009/ | + | padding-left: 10px; |
+ | color:#e4e4e4; | ||
+ | list-style: none; | ||
+ | text-align:left; | ||
+ | border-width: 0px; | ||
} | } | ||
- | + | ||
- | + | #navigation ul.subMenu a { | |
- | + | background: none; | |
+ | color: white; | ||
+ | padding: 3px 2px; | ||
+ | list-style: none; | ||
+ | text-align:left; | ||
+ | border-width: 0px; | ||
+ | padding:0; | ||
+ | margin:0; | ||
} | } | ||
- | + | .menu_header { | |
display: block; | display: block; | ||
width: 110px; | width: 110px; | ||
- | + | background: url(https://static.igem.org/mediawiki/2009/e/eb/Menu_header.png); | |
- | color: # | + | color: #FFF; |
padding:0; | padding:0; | ||
- | + | margin:0; | |
} | } | ||
- | + | .menu_footer { | |
- | + | width:110px; | |
- | + | background: url(https://static.igem.org/mediawiki/2009/d/d5/Footer_Menu.png); | |
- | + | color: #FFF; | |
- | + | padding:0; | |
- | + | margin:0; | |
} | } | ||
- | + | .open_at_load{ | |
- | + | background: url(https://static.igem.org/mediawiki/2009/7/7c/Menu_Paris.png)repeat; | |
- | + | margin: 0px; | |
- | + | padding-left: 2px; | |
- | color: | + | color:#e4e4e4; |
- | + | list-style: none; | |
- | + | text-align:left; | |
- | + | border-width: 0px; | |
} | } | ||
- | + | ||
- | + | #navigation ul.open_at_load a { | |
- | + | background: none; | |
- | + | color: white; | |
- | + | padding: 3px 2px; | |
- | + | list-style: none; | |
- | + | text-align:left; | |
- | + | border-width: 0px; | |
- | + | padding:0; | |
- | + | margin:0; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | + | </style> | |
- | + | <!--[if lte IE 6]> | |
+ | <style type="text/css"> | ||
+ | li { | ||
+ | height: 1px; | ||
} | } | ||
- | + | </style> | |
- | + | <![endif]--> | |
- | + | ||
- | + | <script type="text/javascript" src="http://www.alsacreations.com/xmedia/tuto/exemples/accordeon/jquery-1.2.1.js"></script> | |
- | + | <script type="text/javascript"> | |
- | + | <!-- | |
- | + | $(document).ready( function () { | |
- | + | // Hide subMenu | |
- | + | // Exept the "open_at_load" : | |
- | + | $("ul.subMenu:not('.open_at_load')").hide(); | |
- | function | + | // On selectionne tous les items de liste portant la classe "toggleSubMenu" |
- | + | ||
- | + | // replace by span: | |
- | + | $("li.toggleSubMenu span").each( function () { | |
- | + | // On stocke le contenu du span : | |
- | + | var TexteSpan = $(this).text(); | |
- | + | $(this).replaceWith('<a href="" title="Afficher le sous-menu">' + TexteSpan + '</a>') ; | |
- | + | } ) ; | |
- | + | ||
- | + | // modify "click" on link listed in class "toggleSubMenu" : | |
- | + | $("li.toggleSubMenu > a").click( function () { | |
- | + | // if subMenu is already open, we close it : | |
- | + | if ($(this).next("ul.subMenu:visible").length != 0) { | |
- | + | $(this).next("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } ); | |
- | + | } | |
- | + | // if subMenu is hided, we close them : | |
- | + | else { | |
- | + | $("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } ); | |
- | function | + | $(this).next("ul.subMenu").slideDown("normal", function () { $(this).parent().addClass("open") } ); |
- | + | } | |
- | + | return false; | |
- | + | }); | |
- | + | ||
- | + | } ) ; | |
- | + | // --> | |
- | + | ||
- | } | + | |
- | + | ||
- | // | + | |
- | + | ||
- | + | ||
- | + | ||
- | function | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | --> | + | |
</script> | </script> | ||
</head> | </head> | ||
- | <body><table><tr><td> | + | <body> |
- | + | <table cellspacing="0"><tr><td> | |
- | <ul id=" | + | <ul id="navigation"> |
- | + | <li class="menu_header"> | |
- | <hr> | + | <hr> |
- | + | <li class="toggleSubMenu"><span>. Home .</span> | |
- | + | <ul class="subMenu"> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris#top">Synopsis</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Brainstorm#top">Brainstorm</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Project#top">OMV Project</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Modeling#top">Modeling</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Conclusion#top">Conclusion</a></li> | |
- | + | </ul> | |
- | + | </li> | |
- | + | <li class="toggleSubMenu"><span>. Addressing .</span> | |
- | + | <ul class="subMenu"> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Addressing_overview#top">Export & ClyA</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Addressing_design#top">Parts</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Addressing_testing#top">WetLab</a></li> | |
- | + | </ul> | |
- | + | </li> | |
- | + | <li class="toggleSubMenu"><span>. Production .</span> | |
- | + | <ul class="subMenu"> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Production_overview#top">Tol/Pal system</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Production_modeling#top">Delay model</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Production_modeling2#top">Vesicle model</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Production_design#top">Parts</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Production_testing#top"> WetLab</a></li> | |
- | + | </ul> | |
- | + | </li> | |
- | + | <li class="toggleSubMenu"><span>. Reception .</span> | |
- | + | <ul class="subMenu"> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Transduction_overview#top">Mbr fusion</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Transduction_overview2#top">Transduction</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Transduction_modeling#top">Fec simulation</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Transduction_design#top">Parts</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Transduction_testing#top">WetLab</a></li> | |
- | + | </ul> | |
- | + | </li> | |
- | + | <li class="toggleSubMenu"><span>. Ethics .</span> | |
- | + | <ul class="subMenu"> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Ethics_ethicallabbook#top">Lab book</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Ethics_ethicallabbook#top">Report</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Ethics_Materials#top">Materials</a></li> | |
- | + | </ul> | |
- | + | </li> | |
- | + | <li class="toggleSubMenu"><span>. Tool .</span> | |
- | + | <ul class="open_at_load"> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Tool_introduction#top">Introduction</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Tool_DataBase#top ">Databases</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Tool_OSXSoft#top">Mac Software</a></li> | |
- | + | <li><a href="https://2009.igem.org/Team:Paris/Tool_iPhone#top">iPhone</a></li> | |
- | < | + | </ul> |
- | + | </li> | |
- | </ul></td></tr> | + | <li class="menu_footer"> </li> |
+ | </ul> | ||
+ | </td></tr> | ||
</table> | </table> | ||
</body> | </body> | ||
- | |||
</html> | </html> | ||
- | |||
</div> | </div> | ||
<!-- start content area --> | <!-- start content area --> |