Difference between revisions of "Template:Team:TU Darmstadt/MainMenu"

Line 135: Line 135:
 
     }
 
     }
 
   });
 
   });
 +
});
 +
</script>
 +
 +
<script>
 +
var distance = $('.navbar').offset().top,
 +
console.log(distance);
 +
    $window = $(window);
 +
 +
$window.scroll(function() {
 +
    if ( $window.scrollTop() >= distance ) {
 +
        .navbar.css('position: fixed');
 +
console.log('on top');
 +
    }
 
});
 
});
 
</script>
 
</script>
 
</html>
 
</html>

Revision as of 09:32, 13 October 2016