new WOW().init(); var upsSwiper = new Swiper('#ups-banner .swiper-container', { speed: 1000, longSwipes: false, effect: "fade", loop: true, autoplay: { delay: 5000, disableOnInteraction: false, }, navigation: { nextEl: '#ups-banner .swiper-button-next', prevEl: '#ups-banner .swiper-button-prev', }, pagination: { el: '#ups-banner .swiper-pagination', clickable: true, } }); var upSwiper = new Swiper('#up-banner .swiper-container', { speed: 1000, longSwipes: false, slidesPerView: 5, spaceBetween: 30, loop: true, autoplay: { delay: 5000, disableOnInteraction: false, }, navigation: { nextEl: '#up-banner .swiper-button-next', prevEl: '#up-banner .swiper-button-prev', }, pagination: { el: '#up-banner .swiper-pagination', clickable: true, }, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10, } } }); var appleSwiper = new Swiper('.apple-retail .swiper-container', { speed: 700, slidesPerView: 'auto', centeredSlides: true, loop: true, spaceBetween: 46, on: { init: function () { this.slides.removeClass('init'); }, }, navigation: { nextEl: '.apple-retail .swiper-button-next', prevEl: '.apple-retail .swiper-button-prev', } }); var productSwiper = new Swiper('#productSwiper .swiper-container', { speed: 1000, longSwipes: false, slidesPerView: 3, spaceBetween: 0, loop: true, // autoplay: { // delay: 5000, // disableOnInteraction: false, // }, navigation: { nextEl: '#productSwiper .swiper-button-next', prevEl: '#productSwiper .swiper-button-prev', }, pagination: { el: '#productSwiper .swiper-pagination', clickable: true, }, breakpoints: { 768: { slidesPerView: 1, spaceBetween: 10, } } }); //鎼滅储 $(".header-ss-pc-bk").click(function () { $(".search-ss-pc").slideToggle(200); }); // 百度分享 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)]; //下拉菜单 $('#nav li').hover(function () { $('ul', this).stop().slideDown(200); }, function () { $('ul', this).stop().slideUp(100); }); // tab切换 function TabPlugin() { }; TabPlugin.prototype = { clickTab: function (btn, bchild, lichild) { $('#' + btn + ' ' + bchild).click(function () { $(this).addClass('active').siblings().removeClass('active'); var index = $(this).index(); console.log(index) $('.' + btn + '_li' + ' ' + lichild).eq(index).addClass('on').siblings().removeClass('on'); }) }, hoverTab: function (btn, bchild, lichild) { $('#' + btn + ' ' + bchild).hover(function () { $(this).addClass('active').siblings().removeClass('active'); var index = $(this).index(); $('.' + btn + '_li' + ' ' + lichild).eq(index).addClass('on').siblings().removeClass('on'); }) }, } // var tab1 = new TabPlugin(); // tab1.tab('t_btn','li','li');//切换按钮id,切换按钮,切换列表子元素 var tab = new TabPlugin(); tab.hoverTab('t_btn', 'li', 'li');//切换按钮id,切换按钮,切换列表子元素 var tab2 = new TabPlugin(); tab2.hoverTab('t_btn', 'li', '.t_btn_item');//切换按钮id,切换按钮,切换列表子元素 //调用示例 layer.photos({ photos: '#layer-photos-1', anim: 5 }); // 自定义的data $(".dropdown-menu").on("click", "[data-stopPropagation]", function (e) { e.stopPropagation(); }); // 数字滚动 $(".num1 span").numberRock({ speed: 14, count: 1998 }) $(".num2 span").numberRock({ speed: 18, count: 15000 }) $(".num3 span").numberRock({ speed: 20, count: 1000 }) $(".num4 span").numberRock({ speed: 25, count: 2500 }) // 视频弹出 $('.videolist').each(function () { //遍历视频列表 $(this).hover(function () { //鼠标移上来后显示播放按钮 $(this).find('.videoed').show(); }, function () { $(this).find('.videoed').hide(); }); $(this).click(function () { //这个视频被点击后执行 var img = $(this).attr('vpath');//获取视频预览图 var video = $(this).attr('ipath');//获取视频路径 $('.videos').html(""); $('.videos').show(); }); }); function close1() { var v = document.getElementById('video');//获取视频节点 $('.videos').hide();//点击关闭按钮关闭暂停视频 v.pause(); $('.videos').html(); } function verSlide() { jQuery(".foucebox").slide({ mainCell: ".bd ul", effect: "fold", autoPlay: false, delayTime: 300, triggerTime: 50, vis: 3, prevCell: ".prev", nextCell: ".next" }); var heig = $(".foucebox .hd ul li").outerHeight(true); $(".foucebox .hd .box").css({ height: heig * 3 }); var index = $(".foucebox .hd ul li").index($(".foucebox .hd ul .on")); if (index == 0) { $('.foucebox .prev').css({ "pointer-events": "none", "opacity": 0.5, "cursor": "not-allowed" }); } $(".foucebox .hd ul li").hover(function () { var i = $(this).index(); var l = $(".foucebox .hd ul li").length - 1; switch (i) { case 0: $('.foucebox .prev').css({ "pointer-events": "none", "opacity": 0.5, "cursor": "not-allowed" }); break; case l: $('.foucebox .next').css({ "pointer-events": "none", "opacity": 0.5, "cursor": "not-allowed" }); break; default: $('.foucebox .prev').css({ "pointer-events": "auto", "opacity": 1, "cursor": "auto" }); $('.foucebox .next').css({ "pointer-events": "auto", "opacity": 1, "cursor": "auto" }); } }); $('.foucebox .next').click(function () { var count = $(".foucebox .hd ul li").index($(".foucebox .hd ul .on")); var len = $(".foucebox .hd ul li").length; var num = len - count; $('.foucebox .prev').css({ "pointer-events": "auto", "opacity": 1, "cursor": "auto" }); if (num == 1) { $('.foucebox .next').css({ "pointer-events": "none", "opacity": 0.5, "cursor": "not-allowed" }); } $(".foucebox .hd ul").css({ position: "relative", top: (-heig * count) + "px", }); if (count > 2) { $(".foucebox .hd ul").css({ position: "relative", top: -(heig * (count - 2)) + "px", }); } else { $(".foucebox .hd ul").css({ position: "relative", top: "0px", }); } }); $('.foucebox .prev').click(function () { var count = $(".foucebox .hd ul li").index($(".foucebox .hd ul .on")); if (count == 0) { $('.foucebox .prev').css({ "pointer-events": "none", "opacity": 0.5, "cursor": "not-allowed" }); } $('.foucebox .next').css({ "pointer-events": "auto", "opacity": 1, "cursor": "auto" }); var count2 = count - 1; if (count > 2) { $(".foucebox .hd ul").css({ position: "relative", top: "auto", bottom: heig * count2 + "px", }); } else { $(".foucebox .hd ul").css({ position: "relative", top: "0px", }); } }); } verSlide(); $("#loadMore").click(function () { $(this).hide(); $(".product_list li").addClass("show"); }); $(".jobHover li").hover(function () { $(this).addClass("active").siblings().removeClass("active") })