js.js 3.04 KB

$(function () {


  var sencond = $(".link_con"),
    arr = {},
    vli = $("#link");

  vli.mouseenter(function() {
    var a = $(this),
      c = $(".link_con");
    c.css('display', 'block');
    a.addClass('on');
  }).mouseleave(function() {
    var a = $(this),
      v = $(".link_con");
    arr[a] = setTimeout(function() {
      v.css(
        'display','none'
      );
    }, 500);
    setTimeout(function() {
      a.removeClass('on');
    }, 1000)

  });
  sencond.mouseenter(function() {
    var s =$(this);
    clearInterval(arr[s]);

  }).mouseleave(function() {
    $(this).css('display','none');

  });


  //导航
  var e = this,
    a = $(".header"),
    t = a.find(".category-item");
  t.hover(function() {
    var t = $(this),
      n = t.find(".dropdown-menu.full-screen");
    if(n.length <= 0) return a.find(".opened").removeClass("opened"), void a.find(".dropdown-menu.full-screen").css("height", "");
    if(!t.hasClass("opened")) {
      var r = t.find(".dropdown-container").height(),
        i = a.find(".opened");
      i.length > 0 ? (a.find(".dropdown-menu.full-screen").css("height", ""), a.find(".opened").removeClass("opened"), n.css("height", r)) : (n.stop().css("height", 0), e.animateFinish = !1, n.animate({
        height: r
      }, 300, function() {
        e.animateFinish = !0
      })), t.addClass("opened")
    }

  }), a.on("mouseleave", function() {
    a.find(".opened").removeClass("opened"), a.find(".dropdown-menu.full-screen").stop().css("height", "")
  });
  $('.nav-data').mouseenter(function() {
    var pic=$(this).data("pic");

    $("#p_navPic").attr("src",pic);
    $("#p_navPic1").attr("src",pic);
    // $("#p_navTit").html(tit);
    console.log('1');
  })


  // $('.dropdown-menu').hide();



  //客服
  $(".kf span").hover(function(){
    $(this).find("div").show();
  },function(){
    $(this).find("div").hide();
  });
  $(".kf .back_top").click(function(){
    $("html,body").animate({"scrollTop":0}, 1000);
  });
  //鏀惰捣瀹㈡湇
  var kfi=0;
  $(".shou").click("fast", function(){
    kfi++;
    if(kfi%2==0){
      $(this).removeClass('on');
      $(".kf").css({"right":"20px"});
    }else{
      $(this).addClass('on');
      $(".kf").css({"right":"-67px"});
    }

    //灞曞紑瀹㈡湇
    $(".zhan").click(function(){
      $(this).delay(10000).stop().fadeOut();
      $(".kf").css({"right":"30px"});
      $(".shou").css({"right":"92px"});
    });
  });

  $(window).scroll(function(){
    var h = $(window).height();
    var sc = $(window).scrollTop();

    //瀹㈡湇鏄剧ず
    if(sc>0){
      $(".kf").show();
    }else{
      $(".kf").hide();
    }

  });
});

window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];


$(window).load(function(){
  if($('#preloader').length > 0) {
    $('#preloader').removeClass('show');
  }
});