Team:Tsinghua/header
From 2011.igem.org
(Difference between revisions)
GuoQiangChen (Talk | contribs) |
|||
(38 intermediate revisions not shown) | |||
Line 5: | Line 5: | ||
<div id="background"></div> | <div id="background"></div> | ||
<div id="topmost"> | <div id="topmost"> | ||
- | <img src="https://static.igem.org/mediawiki/2011/b/bc/THUHeader.png" class="headerpic"/> | + | <a href="/" title="iGEM 2011 Main Page"><img alt="Main Page" src="https://static.igem.org/mediawiki/2011/b/bc/THUHeader.png" class="headerpic"/></a> |
</div> | </div> | ||
<div id="topbar"> | <div id="topbar"> | ||
Line 35: | Line 35: | ||
</div> | </div> | ||
<script> | <script> | ||
+ | $(document).ready(function(){ | ||
+ | $("#catlinks").remove(); | ||
+ | $("span[id=a-tip]").hover(function(){ | ||
+ | var tip=""; | ||
+ | try{ | ||
+ | tip="<div class='tipdiv'>" + $(this).find('.div-tip').text() + "</div>"; | ||
+ | |||
+ | $(this).append(tip); | ||
+ | $(this).find('.tipdiv').fadeIn('slow'); | ||
+ | }catch(e){} | ||
+ | }, function(){ | ||
+ | try{ | ||
+ | $(this).find('.tipdiv').fadeOut('fast'); | ||
+ | $(this).find('.tipdiv').remove(); | ||
+ | }catch(e){} | ||
+ | }); | ||
+ | }); | ||
$('li[id*="nav-"]').hover(function(){ | $('li[id*="nav-"]').hover(function(){ | ||
- | var dpad = 0; | + | var dpad = 0; |
- | dpad = Math.round($(this).attr("offsetWidth")/ | + | dpad = Math.round($(this).attr("offsetWidth")/19); |
- | dpad = 25-dpad; | + | if(isNaN(dpad)) |
- | dpad += "px"; | + | dpad = Math.round($(this)[0].offsetWidth / 19); |
- | $(this).animate({"fontSize": "22px", "paddingTop": "4px", "paddingLeft": dpad, "paddingRight": dpad}, 400, function(){ | + | dpad = 25 - dpad; |
- | + | dpad += "px"; | |
- | }, function(){}); | + | $(this).animate({"fontSize": "22px", "paddingTop": "4px", "paddingLeft": dpad, "paddingRight": dpad}, 400, function(){ |
+ | $(this).animate({"fontSize": "18px", "paddingTop": "5px", "paddingLeft": "25px", "paddingRight": "24px"}, 200)}); | ||
+ | }, function(){}); | ||
+ | |||
</script> | </script> | ||
+ | <img id="wprint" src="https://static.igem.org/mediawiki/2011/e/eb/Sh3.png" /> | ||
</html> | </html> |
Latest revision as of 14:27, 26 October 2011