//if($("#ddd").length<=0){ //$("header").after('
'); //} $(window).scroll(function(){ if(!open){ var sc=$(window).scrolltop(); var rwidth=$(window).width(); if(sc>0){ $("#backtop").css("display","flex"); }else{ $("#backtop").css("display","none"); } var header_top_h = $(".header-top").height(); //console.log(sc,header_top_h); if(sc>header_top_h){ $(".navbar").addclass("ff"); //$("#ddd").css("display","block"); if ($(document).width() > 768) { //$(".header-top").css("display","flex"); $(".header-bottom").css("margin-top",$(".navbar").height()); }else{ //$(".header-top").css("display","block"); $(".header-top").css("margin-bottom",$(".navbar").height()); } }else{ //$("#ddd").css("display","none"); $(".navbar").removeclass("ff"); if ($(document).width() > 768) { //$(".header-top").css("display","flex"); $(".header-bottom").css("margin-top",0); }else{ //$(".header-top").css("display","block"); $(".header-top").css("margin-bottom",0); } } } }) if($(document).width() >= 1200 && $(document).width() <= 1400){ $(".navbar>div.maxw1200").css("padding-right",'97px'); } $("#backtop").click(function(){ var sc=$(window).scrolltop(); $('body,html').animate({scrolltop:0},500); })