Template:Team:Trieste/menu
From 2012.igem.org
(Difference between revisions)
(fix js) |
(fix home menu) |
||
Line 65: | Line 65: | ||
</ul> | </ul> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | $(function(){ | |
- | + | title_regexp = /http:\/\/2012\.igem\.org\/Team:Trieste\/([a-zA-Z]+).*/; | |
- | + | title = title_regexp.exec(location.href); | |
- | + | if (title === null){ | |
- | + | $('#navigation > li:first').addClass('select'); | |
- | + | } else { | |
- | + | $('#navigation > li > a[href$=' + title[1] + ']').parent().addClass('select'); | |
- | + | } | |
- | + | /* js menu */ | |
- | + | $('#navigation > li').hover( | |
- | + | function () { | |
- | + | //show its submenu | |
- | + | $('ul', this).stop().show(); | |
- | + | }, | |
- | + | function () { | |
- | + | //hide its submenu | |
+ | $('ul', this).stop().hide(); | ||
+ | } | ||
+ | ); | ||
+ | }); | ||
</script> | </script> | ||
<a href="http://socialigem.ning.com" target="_blank"><img src="/wiki/images/5/5c/Trieste-SocialiGEM.png" alt="SocialiGEM" class="logo-socialigem" /></a> | <a href="http://socialigem.ning.com" target="_blank"><img src="/wiki/images/5/5c/Trieste-SocialiGEM.png" alt="SocialiGEM" class="logo-socialigem" /></a> |
Revision as of 13:54, 26 September 2012