Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Created by eric- on 03.11.2016.
  3.  */
  4. jQuery( document ).ready(function() {
  5.     $(window).scroll(function() {
  6.         if($( document ).width() > 960){
  7.             if ($(this).scrollTop() > 340){
  8.                 $('body').addClass("stickyPaddding");
  9.                 $('header').addClass("header-floating");
  10.             }
  11.             else{
  12.                 $('body').removeClass("stickyPaddding");
  13.                 $('header').removeClass("header-floating");
  14.             }
  15.         }
  16.     }); //missing );
  17.  
  18.     $('.mobileNav').click(function(){
  19.         $('.mobileNavView').toggle(function(){
  20.  
  21.             if ($('mobileNavView').is(':visible') ) {
  22.                 $('.header').css({height: '100%'});
  23.             }else{
  24.                 $('.header').css({height: 'default'});
  25.             }
  26.            
  27.         });
  28.     });
  29.     $('.menu-item-has-children').click(function(e){
  30.         if(!$(e.target).closest('a').length){
  31.             $(this).find('.sub-menu').toggle();
  32.         }
  33.     });
  34.     var menuHeight = $(window).height() - 120;
  35.     $('.mobileNavView').children('.menu-hauptmenue-container').css({height: menuHeight})
  36. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement