Template:Team:Calgary/Test
From 2013.igem.org
(Difference between revisions)
Line 35: | Line 35: | ||
<script> | <script> | ||
$(document).ready(function() { | $(document).ready(function() { | ||
+ | NavSizing(); | ||
+ | |||
+ | $(window).resize(function() { | ||
+ | NavSizing(); | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | function NavSizing() { | ||
if ($('body').width() > 868) { | if ($('body').width() > 868) { | ||
$('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2)); | $('#TopBar').css('padding-left', Math.floor(($('body').width() - 868) / 2)); | ||
$('#LogoItem').css('display', 'block'); | $('#LogoItem').css('display', 'block'); | ||
} | } | ||
- | else if ($('body').width() <= 868) | + | else if (($('body').width() <= 868) && ($('body').width() > 744)) { |
- | + | $('#TopBar').css('padding-left', Math.floor(($('body').width() - 744) / 2)); | |
- | + | $('#LogoItem').css('display', 'none'); | |
- | + | ||
- | + | ||
} | } | ||
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</script> | </script> | ||
</head> | </head> | ||
</html | </html |
Revision as of 22:27, 13 August 2013