Template:Team:Waterloo/Footbar
From 2014.igem.org
(Difference between revisions)
Line 55: | Line 55: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | ||
+ | <script type="text/javascript"> | ||
+ | |||
+ | //Align headings | ||
+ | function alignHeadings(){ | ||
+ | var remainingWidth = $("div#topbar").width(); | ||
+ | var allheadings = $("ul#headings >li"); | ||
+ | allheadings.css("display", "block"); | ||
+ | $("ul#shortheadings >li").css("display", "none"); | ||
+ | allheadings.width(remainingWidth / (allheadings.length + 0.5)) | ||
+ | .css({"text-align":"center","line-height":"150%"}); | ||
+ | } | ||
+ | |||
+ | $(document).ready(alignHeadings); | ||
+ | $(window).resize(alignHeadings); | ||
+ | </script> | ||
</html> | </html> | ||
{{Template:Team:Waterloo/JS/baseWiki}} | {{Template:Team:Waterloo/JS/baseWiki}} |
Revision as of 01:17, 17 October 2014