Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by eric- on 03.11.2016.
- */
- jQuery( document ).ready(function() {
- $(window).scroll(function() {
- if($( document ).width() > 960){
- if ($(this).scrollTop() > 340){
- $('body').addClass("stickyPaddding");
- $('header').addClass("header-floating");
- }
- else{
- $('body').removeClass("stickyPaddding");
- $('header').removeClass("header-floating");
- }
- }
- }); //missing );
- $('.mobileNav').click(function(){
- $('.mobileNavView').toggle(function(){
- if ($('mobileNavView').is(':visible') ) {
- $('.header').css({height: '100%'});
- }else{
- $('.header').css({height: 'default'});
- }
- });
- });
- $('.menu-item-has-children').click(function(e){
- if(!$(e.target).closest('a').length){
- $(this).find('.sub-menu').toggle();
- }
- });
- var menuHeight = $(window).height() - 120;
- $('.mobileNavView').children('.menu-hauptmenue-container').css({height: menuHeight})
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement