Team:Edinburgh/tech/Navbox
From 2011.igem.org
(Difference between revisions)
Line 6: | Line 6: | ||
<![endif]--> | <![endif]--> | ||
<script type="text/javascript" src="/Team:Edinburgh/tech/js?action=raw&ctype=text/javascript"></script> | <script type="text/javascript" src="/Team:Edinburgh/tech/js?action=raw&ctype=text/javascript"></script> | ||
+ | <script type="text/javascript" language="javascript"> | ||
+ | $(document).ready(function(){ | ||
+ | // Reset Font Size | ||
+ | var originalFontSize = $('.main_body').css('font-size'); | ||
+ | $(".resetFont").click(function(){ | ||
+ | $('html').css('font-size', originalFontSize); | ||
+ | }); | ||
+ | // Increase Font Size | ||
+ | $(".increaseFont").click(function(){ | ||
+ | var currentFontSize = $('.main_body').css('font-size'); | ||
+ | var currentFontSizeNum = parseFloat(currentFontSize, 10); | ||
+ | var newFontSize = currentFontSizeNum*1.2; | ||
+ | $('html').css('font-size', newFontSize); | ||
+ | return false; | ||
+ | }); | ||
+ | // Decrease Font Size | ||
+ | $(".decreaseFont").click(function(){ | ||
+ | var currentFontSize = $('.main_body').css('font-size'); | ||
+ | var currentFontSizeNum = parseFloat(currentFontSize, 10); | ||
+ | var newFontSize = currentFontSizeNum*0.8; | ||
+ | $('html').css('font-size', newFontSize); | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
<div class="tops"> | <div class="tops"> | ||
<a href="/Team:Edinburgh"><div class="logo"> | <a href="/Team:Edinburgh"><div class="logo"> | ||
Line 81: | Line 106: | ||
<div class="hint" id="def_hint">Hover over words in <i><b>bold italics</b></i> to see explanation.</div> | <div class="hint" id="def_hint">Hover over words in <i><b>bold italics</b></i> to see explanation.</div> | ||
</div> <!-- /hints --> | </div> <!-- /hints --> | ||
- | <div id="fontnav"><a href="#bigger"><img src="/wiki/images/a/a7/Edinburgh-big-A.png" /></a> <a href="javascript:mytextsizer.setFontLevel(0)"><img src="/wiki/images/0/0e/Edinburgh-A.png"></a> <a href="#smaller"><img src="/wiki/images/1/15/Edinburgh-small-A.png" /> | + | <div id="fontnav"><a href="#bigger"><img src="/wiki/images/a/a7/Edinburgh-big-A.png" /></a> <a href="javascript:mytextsizer.setFontLevel(0)"><img src="/wiki/images/0/0e/Edinburgh-A.png"></a> <a href="#smaller"><img src="/wiki/images/1/15/Edinburgh-small-A.png" /></a> |
</div> | </div> | ||
</div> <!-- /sidebar --> | </div> <!-- /sidebar --> | ||
<!-- end nav+logo --> | <!-- end nav+logo --> | ||
</html> | </html> |
Revision as of 16:41, 21 September 2011