}) } function navFn(){ $('.nav li').each(function(){ if($(this).children('ul')[0] !=undefined){ $(this).prepend('') } }) $('.nav i').each(function(){ $(this).click(function(event){ if( $(this).siblings('ul').css('display')=='none'){ $(this).siblings('ul').addClass('sonOpen'); $(this).addClass('touch'); $(this).parents('ul').addClass('on'); }else{ $(this).siblings('ul').removeClass('sonOpen'); $(this).removeClass('touch') } event.stopPropagation(); }) }) } $('.head .btn').click(function(event){ if($('.nav').css('opacity') ==0){ open(); }else{ close(); } event.stopPropagation(); }) $('.nav ul li').each(function(){ $(this).click(function(){ event.stopPropagation(); }) }) $('.nav ul ').click(function(){ close(); event.stopPropagation(); }); $('.nav').click(function(){ close(); event.stopPropagation(); }) /* nav e */ if(w<1200){ jQuery(" .product .list").slide({ titCell:"h4", targetCell:"ul", defaultIndex:0, effect:"slideDown", delayTime:300, trigger:"click" }); navFn() } function mar(id, id1, id2,time){ var speed=25; //数字越大速度越慢 var tab=document.getElementById(id); var tab1=document.getElementById(id1); var tab2=document.getElementById(id2); tab2.innerHTML=tab1.innerHTML; function Marquee(){ if(tab2.offsetWidth-tab.scrollLeft<=0) tab.scrollLeft-=tab1.offsetWidth; else{ tab.scrollLeft++; } } var MyMar=setInterval(Marquee,speed); tab.onmouseover=function() {clearInterval(MyMar)}; tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)}; } mar("show","pic1","pic2"); var swiper = new Swiper(".lcSwiper", { spaceBetween: 35, freeMode: true, breakpoints:{ 1200:{ noSwiping : true, slidesPerView: 7, }, 320:{ noSwiping :false, slidesPerView: 'auto', } }, scrollbar: { el: ".swiper-scrollbar", hide: true, }, }); var swiper = new Swiper(".advSwiper", { freeMode: true, breakpoints:{ 1200:{ noSwiping : true, slidesPerView: 'auto', }, 320:{ noSwiping :false, spaceBetween: 20, slidesPerView: '1', } }, scrollbar: { el: ".swiper-scrollbar", hide: true, }, }); $(window).resizeEnd({ delay : 0 }, function(){ var w2 = document.body.clientWidth; if(w2<1200){ jQuery(" .product .list").slide({ titCell:"h4", targetCell:"ul", defaultIndex:0, effect:"slideDown", delayTime:300, trigger:"click" }); navFn() } }); $(window).resizeEnd(); $(window).scroll(function(){ if($(window).scrollTop() >= 800){ $("#goTop").css('display','block') } else{ $("#goTop").css('display','none') } }); $(function(){ showScroll(); function showScroll(){ $('#goTop').click(function(){ $("html,body").animate({scrollTop:0},800); }); } }) function mar2(id, id1, id2,time){ var speed=25; //数字越大速度越慢 var tab=document.getElementById(id); var tab1=document.getElementById(id1); var tab2=document.getElementById(id2); tab2.innerHTML=tab1.innerHTML; function Marquee(){ if(tab2.offsetHeight-tab.scrollTop<=0) tab.scrollTop-=tab1.offsetHeight; else{ tab.scrollTop++; } } var MyMar=setInterval(Marquee,speed); tab.onmouseover=function() {clearInterval(MyMar)}; tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)}; } mar2("show2","list1","list2")
复制成功
微信号: gjj0938
添加微信好友, 获取更多信息
我知道了!
13220071230
微信号: gjj0938 添加微信