$(function () { $(".header1").load( contextpath + "/header.htm"); $(".footer1").load( contextpath + "/footer.htm"); //锚点跳转 $(".com-anchor .bl1").click(function () { var cls = $(this).attr("id"); cls2 = cls.substring(2, cls.length); var daoda = "." + "fo" + cls2; $('html,body').animate({scrolltop: $(daoda).offset().top}); }); //招聘点击下拉 $(".join .join-bot .dn-bot .dlist .dn-sha").click(function () { var box = $(this).siblings('.dn-xia'); if (box.is(":visible")) { box.slideup(); $(this).removeclass("hover"); } else { box.slidedown(); $(this).addclass("hover"); $(this).parents(".dlist").siblings('.dlist').find(".dn-xia").slideup().siblings('.dn-sha').removeclass("hover"); } }); if ($(window).width() < 750) { $('.com-duan').find('br').remove(); //产品详情移动端点击下拉 $(".com-pronav .i-xia").click(function () { $(this).toggleclass("zhuan"); $(".com-pronav .dfl .dp2").stop().slidetoggle(); }); } //新闻 $(".news-ban").css({"height": $(".news-ban").width() * 600 / 1920}); $(".news-ban2").css({"height": $(".news-ban2").width() * 440 / 1920}); $(".djgz-ban1").css({"height": $(".djgz-ban1").width() * 600 / 1920}); $(".djgz-ban2").css({"height": $(".djgz-ban2").width() * 460 / 1920}); //立即购买点击弹窗 $('.a-buy').on('click', function () { layer.open({ title: false, shade: 0.5, type: 1, shadeclose: true, content: $(".lay-lore"), area: ['auto', 'auto'], //area: ['auto', '72%'], btn: false, scrollbar: false }); }); var comsw1 = $('.com-sw1').swiper({ loop: true, autoplaydisableoninteraction: false, autoplay: 5000, pagination: '.com-sw1 .pagination', paginationclickable: true }); $(window).resize(function () { $(".news-ban").css({"height": $(".news-ban").width() * 600 / 1920}); $(".news-ban2").css({"height": $(".news-ban2").width() * 440 / 1920}); $(".djgz-ban1").css({"height": $(".djgz-ban1").width() * 600 / 1920}); $(".djgz-ban2").css({"height": $(".djgz-ban2").width() * 460 / 1920}); $('.com-djgzban .box-n').css({"margin-top": -$(".com-djgzban .box-n").height() / 2}); }); $(window).scroll(function () { if ($(this).scrolltop() > 60) { $(".com-pronav").addclass('fix'); } else { $(".com-pronav").removeclass('fix'); } }); if ($(window).width() < 1200&&$(window).width() > 750) { $('meta[name="viewport"]').attr('content', "width=device-width,initial-scale=1.0,user-scalable=yes"); } var wow = new wow({ boxclass: 'wow', animateclass: 'animated', offset: 160, mobile: true, live: true }); if (!(/msie [6|7|8|9]/i.test(navigator.useragent)) && $(window).width() > 750) { wow.init(); } $(".wow").attr({"data-wow-duration": ".8s"}); $(".jtjs-kqmz .dn-bot .blo-box:nth-of-type(2),.scjy-bot2 .dn-bot .blo-box:nth-of-type(2)").attr("data-wow-delay", ".15s"); $(".jtjs-kqmz .dn-bot .blo-box:nth-of-type(3),.scjy-bot2 .dn-bot .blo-box:nth-of-type(3)").attr("data-wow-delay", ".3s"); $(".jtjs-kqmz .dn-bot .blo-box:nth-of-type(4),.scjy-bot2 .dn-bot .blo-box:nth-of-type(4)").attr("data-wow-delay", ".45s"); });