if (screen && screen.width > 799){ $(".banner").prepend(''); $(".sub-about-banner").prepend(''); $(".sub-product-banner").prepend(''); $(".sub-join-banner").prepend(''); $(".sub-contact-banner").prepend(''); $(".new-product>.right>.list>ul>li").click(function(){ $(".new-product>.right>.list>ul>li").removeClass("action"); $(this).addClass("action"); }); $(".new-product>.right>.list>ul>li>img").click(function () { //获取图片路径 var newimgsrc = $(this).attr("src"); var bigimg = ''; $(".new-product>.left").html(bigimg); }); $('.show-product>.list>ul').owlCarousel({ items: 3, loop: true, margin: 60, mouseDrag: true, autoplay: false, dots: false, autoplayHoverPause: true, responsiveClass: true }); }else{ $(window).scroll(function() { if ($(window).scrollTop() > 100) { $(".head").css({ "background-color":"#fff", "box-shadow":"0 1px 5px #111", "position":"fixed", "z-index":"9", }); } else { $(".head").css({ "box-shadow":"0 0 0 #111", "position":"relative", }); } }); $("body").prepend(''); $(".banner").prepend(''); $(".sub-about-banner").prepend(''); $(".sub-product-banner").prepend(''); $(".sub-join-banner").prepend(''); $(".sub-contact-banner").prepend(''); $(".new-product>.right>.list>ul>li>img").click(function () { //获取图片路径 var newimgsrc = $(this).attr("src"); var opacityBottom = ''; $(document.body).append(opacityBottom); toBigImg();//变大函数 }); $('.show-product>.list>ul').owlCarousel({ items: 1, loop: true, margin: 60, mouseDrag: true, autoplay: false, dots: false, autoplayHoverPause: true, responsiveClass: true }); }