mostly filebased Content Presentation System
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- function toggle_menu(){
- var menu = document.querySelector('#mobile-nav');
- menu.classList.toggle('open');
- }
-
- $( document ).ready(function() {
- var mainnav = $("#main-nav");
- var platzhalter = $("#platzhalter");
- var test = 2;
-
- $(window).on("scroll", function(e) {
- var pos = $(document).scrollTop();
- var width = $(window).width();
- var airAbove = 250;
- if (width < 1000) {
- if (width > 750) {
- airAbove = width/4;
- } else {
- airAbove = 187;
- }
- }
-
- if (pos > airAbove) {
- mainnav.addClass("fixed");
- platzhalter.addClass("fixed");
- } else {
- mainnav.removeClass("fixed");
- platzhalter.removeClass("fixed");
- }
- });
- });
|