Template:Team:Sheffield/NavigationBar

From 2014.igem.org

(Difference between revisions)
Line 6: Line 6:
<script>
<script>
$(document).ready(function() { // Document ready
$(document).ready(function() { // Document ready
-
console.log("works");
+
$(document).scroll(function() {
-
$(window).scroll(function() {
+
    if ($(document).scrollTop() > 0) {
-
console.log("bodyContent");
+
-
});
+
-
$('#content').scroll(function() {
+
-
console.log("content");
+
-
});
+
-
$('#globalWrapper').scroll(function() {
+
-
console.log("bodyContent");
+
-
});
+
-
$('#pageContent').scroll(function() {
+
-
console.log("pageContent");
+
-
});
+
-
$('#bodyContent').scroll(function() {
+
-
    if ($('#bodyContent').scrollTop() > 0) {
+
        $("#navigationBar").addClass("scrolling");
        $("#navigationBar").addClass("scrolling");
        $("#navigationBar li a").addClass("scrolling");
        $("#navigationBar li a").addClass("scrolling");

Revision as of 10:44, 4 October 2014