$(document).ready(function(){ $(window).resize(function(){ x=$(window).width(); if (x<899){// $(".hamburger").show(); } if (x>900 ){// $(".hamburger").hide(); } }); $(window).trigger("resize"); $('#btn01 div,#btn02 div,#btn03 div').hide(); $(".hamburger").click(function(e) { if($(window).width() < 1000){ if ($("#header").css("height") == "80px") { $("#header").animate({"height": "600px"}, 500,'easeOutBack'); } else if ($("#header").css("height") == "600px") { $("#header").animate({"height": "80px"}, 500,'easeOutBack'); } }else{ $("#header").animate({"height": "80px"}, 500,'easeOutBack'); } }); }); $(document).ready(init); function init(){ //$("#logo").stop().hide(); $(window).scroll(windowscroll); } // function windowscroll(){ if ($(this).scrollTop() <= 0) { $(".pcbg").stop().animate({top: '-80px'}, 100,'easeOutBounce'); //$("#logo").stop().hide(); $('.menuhover').show(); } if ($(this).scrollTop() > 0) { $(".pcbg").stop().animate({top: '0px'}, 100,'easeOutBounce'); //$("#logo").stop().fadeIn(); $('.menuhover').hide(); } $('.cookie .close').on('click', function () { $('.cookie').slideUp(); }) $('.cookie-btn').on('click', function () { addGA(); $('.cookie').slideUp(); }) if(!localStorage.getItem('cookie')){ $('.cookie').show(); } } function hambur(){$('.hamburger').click();} function cookieclose(){$('.cookie').slideUp();} function agreeCookie(){ localStorage.setItem('cookie', '1'); } $('.desktop .sub-menu').on('click', function () { // $(this).hide(); // setTimeout(function(){ // $('.desktop .sub-menu').show(); // },1000); });