Template:Team:Sheffield/NavigationBar
From 2014.igem.org
(Difference between revisions)
Line 4: | Line 4: | ||
<link href='http://fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css'> | <link href='http://fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css'> | ||
<script src="//code.jquery.com/jquery-1.11.1.js"></script> | <script src="//code.jquery.com/jquery-1.11.1.js"></script> | ||
+ | <script> | ||
+ | $(document).ready(function() { // Document ready | ||
+ | $('#bodyContent').scroll(function() { | ||
+ | console.log("bodyContent"); | ||
+ | }); | ||
+ | $('#content').scroll(function() { | ||
+ | console.log("content"); | ||
+ | }); | ||
+ | $('#globalWrapper').scroll(function() { | ||
+ | console.log("bodyContent"); | ||
+ | }); | ||
+ | $('#bodyContent').scroll(function() { | ||
+ | if ($('#bodyContent').scrollTop() > 0) { | ||
+ | $("#navigationBar").addClass("scrolling"); | ||
+ | $("#navigationBar li a").addClass("scrolling"); | ||
+ | $("#teamLogo li a img").addClass("scrolling"); | ||
+ | $("#navigationBar > li > ul > li > a").addClass("scrolling"); | ||
+ | $(".whiteIcon").addClass("scrolling"); | ||
+ | $(".blackIcon").addClass("scrolling"); | ||
+ | } else { | ||
+ | $("#navigationBar").removeClass("scrolling"); | ||
+ | $("#navigationBar li a").removeClass("scrolling"); | ||
+ | $("#teamLogo li a img").removeClass("scrolling"); | ||
+ | $("#navigationBar > li > ul > li > a").removeClass("scrolling"); | ||
+ | $(".whiteIcon").removeClass("scrolling"); | ||
+ | $(".blackIcon").removeClass("scrolling"); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
<style> | <style> | ||
#contentSub, #footer-box, #catlinks, #search-controls, #p-logo, .printfooter, .firstHeading,.visualClear {display: none;} /*-- hides default wiki settings --*/ | #contentSub, #footer-box, #catlinks, #search-controls, #p-logo, .printfooter, .firstHeading,.visualClear {display: none;} /*-- hides default wiki settings --*/ | ||
Line 224: | Line 254: | ||
} | } | ||
</style> | </style> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
</head> | </head> | ||
<body class="content"> | <body class="content"> |
Revision as of 10:36, 4 October 2014