//搴曢儴閾炬帴灞曞紑 $('.fristlink').click(function() { $('.link-pad').css('display','block') var windowHeight = parseInt(document.body.scrollWidth);//jq console.log(windowHeight) $("html,body").animate( { "scrollTop": windowHeight }, 200); }) // 鐢垫鏁堟灉 window.addEventListener('scroll',function () { var winH = $(window).height();//鍙绐楀彛楂樺害 var iTop = $(window).scrollTop();//榧犳爣婊氬姩鐨勮窛绂 if(iTop>=1){ $(".navigation-down").addClass('class_1'); }else{ $(".navigation-down").removeClass('class_1'); } }) var oNav = $('#LoutiNav');//瀵艰埅澹 var aNav = oNav.find('li');//瀵艰埅 var aDiv = $('#main .louceng');//妤煎眰 window.addEventListener('scroll',function () { var winH = $(window).height();//鍙绐楀彛楂樺害 var iTop = $(window).scrollTop();//榧犳爣婊氬姩鐨勮窛绂 //console.log(winH, iTop) if(iTop>=80){ oNav.fadeIn(); //榧犳爣婊戝姩寮忔敼鍙 aDiv.each(function(){ if(winH+iTop - $(this).offset().top>winH/2){ aNav.removeClass('active'); aNav.eq($(this).index()).addClass('active'); } }) }else{ oNav.fadeOut(); } if(iTop>=50){ $(".nchild").addClass('na_hov'); }else{ $(".nchild").removeClass('na_hov'); } }) //input妗嗗け鍘荤劍鐐 $(".isinput").on('blur',function(){ //input妗嗚娓呯┖鏃堕殣钘?x" if($(this).val()==''){ $( '.i_cha').hide(); console.log("1111") } }) // 鑾峰緱鐒︾偣 $('.isinput').focus(function(){ $( '.i_cha').hide(); $(this).next().show(); }); $('.i_cha').click(function(){ $('.isinput').val(''); $( '.i_cha').hide(); }); // $('.fristlink').click(function() { // console.log('1111') // $('.link-pad').css('display','block') // }) //瀵艰埅涓嬫媺鏁堟灉 jQuery(document).ready(function(){ var qcloud={}; $('[_t_nav]').hover(function(){ if (!$(".header").hasClass('header_bg')) { $(".header").addClass('header_bg') } var _nav = $(this).attr('_t_nav'); clearTimeout( qcloud[ _nav + '_timer' ] ); qcloud[ _nav + '_timer' ] = setTimeout(function(){ $('[_t_nav]').each(function(){ $(this)[ _nav == $(this).attr('_t_nav') ? 'addClass':'removeClass' ]('nav-up-selected'); }); $('#'+_nav).stop(true, true).slideDown(600); }, 600); },function(){ var _nav = $(this).attr('_t_nav'); clearTimeout( qcloud[ _nav + '_timer' ] ); qcloud[ _nav + '_timer' ] = setTimeout(function(){ $('[_t_nav]').removeClass('nav-up-selected'); $('#'+_nav).stop(true, true).slideUp(600); }, 600); }); }); //瀵艰埅涓嬫媺鏁堟灉 //搴曢儴浜岀淮鐮 $(document).ready(function(){ $(".ifoot01").mouseover(function(){ $(".wx").addClass("shows"); }); $(".ifoot01").mouseout(function(){ $(".wx").removeClass("shows"); }); $(".ifoot02").mouseover(function(){ $(".spv").addClass("shows"); }); $(".ifoot02").mouseout(function(){ $(".spv").removeClass("shows"); }); }); //搴曢儴浜岀淮鐮 // $(window).scroll(function(){ // if ($(window).scrollTop()>0){ // $('.navigation-down').addClass("class_1"); // }else{ // $('.navigation-down').removeClass("class_1"); // } // }); //鐐瑰嚮鍥炲埌褰撳墠妤煎眰 aNav.click(function(){ var t = aDiv.eq($(this).index()).offset().top; $('body,html').animate({"scrollTop":t},500); $(this).addClass('active').siblings().removeClass('active'); }); //productagn.html js var mySwiper1 = new Swiper('#mySwiper1 ', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper2', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper3', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper4', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper5', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper6', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper7', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); var mySwiper2 = new Swiper('#mySwiper8', { loop: false, slidesPerView: 2, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 10 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1.5, spaceBetween: 10 } }, // 濡傛灉闇€瑕佹粴鍔ㄦ潯 scrollbar: { el: '.swiper-scrollbar', draggable: true, snapOnRelease: false, dragSize: 150, }, }); /* 鍥炲埌椤堕儴 */ $(function() { //鍏堝皢#back-top闅愯棌 $(".scroll-top").hide(); $(".lx").hide(); //褰撴粴鍔ㄦ潯鐨勫瀭鐩翠綅缃窛椤堕儴100鍍忕礌涓€涓嬫椂锛岃烦杞摼鎺ュ嚭鐜帮紝鍚﹀垯娑堝け $(window).scroll(function() { if ($(window).scrollTop() > 100) { $(".scroll-top").show(); $(".lx").show(); } else { $(".scroll-top").hide(); $(".lx").hide(); } }); //鐐瑰嚮璺宠浆閾炬帴锛屾粴鍔ㄦ潯璺冲埌0鐨勪綅缃紝椤甸潰绉诲姩閫熷害鏄?000 $("#back-top").click(function() { $('html,body').animate({scrollTop:0},500); }) $(".link-pad").hide(); }) //鎼滅储 function seach(){ var windoww = $(window).width(); if(windoww>768){ $(".seachdiv").addClass("vis"); }else{ $(".telseach").addClass("vis"); } } function seachxx(){ $(".seachdiv").removeClass("vis"); } var swiperall = new Swiper('#swiperall', { // pagination: '.swiper-pagination', paginationClickable: true, observer:true,//淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper observeParents:true,//淇敼swiper鐨勭埗鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper //loop : true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, observer: true,//淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper observeParents: true,//淇敼swiper鐨勭埗鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper slidesPerView: 4, spaceBetween: 16, breakpoints: { 1024: { slidesPerView: 4, spaceBetween: 16 }, 768: { slidesPerView: 3, spaceBetween: 15 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1, spaceBetween: 8 } } }); var swiperall2 = new Swiper('#swiperall2', { // pagination: '.swiper-pagination', paginationClickable: true, observer:true,//淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper observeParents:true,//淇敼swiper鐨勭埗鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper //loop : true, navigation: { nextEl: '.swiper-button-next2', prevEl: '.swiper-button-prev2', }, observer: true,//淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper observeParents: true,//淇敼swiper鐨勭埗鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper slidesPerView: 3, spaceBetween: 16, breakpoints: { 1024: { slidesPerView: 3, spaceBetween: 16 }, 768: { slidesPerView: 3, spaceBetween: 15 }, 640: { slidesPerView: 2, spaceBetween: 10 }, 320: { slidesPerView: 1, spaceBetween: 8 } } }); var $ww = $(window).width(); var $hh = $(".bannerBox").height(); var video = document.getElementById('medio') if($ww > 1000) { // $('#fullpage').fullpage({ // 'verticalCentered': false, // scrollOverflow: true, // scrollingSpeed: 1000, // resize: true, // 'css3': true, // anchors: ['page1', 'page2', 'page3', 'page4', 'page5'], // 'navigation': false, // 'navigationColor': '#fff', // 'navigationPosition': 'right', // onLeave: function (anchorLink, index) { // if (index.index === 0) { // $(".header").removeClass('header_bg') // // if ($(".menu-tep").is(':hidden') && $("#header-search").hasClass('search-hide') && $(".sele-box").is(':hidden')) { // // } // $(".header").removeClass('flag'); // $(".scroll-top").hide(); // $(".lx").hide(); // $(".nchild").removeClass('na_hov'); // $(".nav-down-menu").removeClass('posi'); // video.play() // } else { // $(".header").addClass('header_bg').addClass('flag'); // $(".nav-down-menu").addClass('posi'); // $(".scroll-top, .lx").show(); // $(".nchild").addClass('na_hov'); // } // }, // afterRender: function () { // $(".scroll-top").hide(); // }, // afterLoad(anchorLink, index) { // console.log(index) // if (index == 4) { // // 褰撻〉闈㈡粴鍔ㄥ埌鍊掓暟绗簩灞忔椂锛屾敼鍙橀〉闈㈡粴鍔ㄦ柟寮 // $.fn.fullpage.setAutoScrolling(false); // // 璁板綍椤甸潰寮€濮嬫粴鍔ㄧ殑浣嶇疆 // let start = $(document).scrollTop(); // let last = 0; // $(document).scroll(function () { // // 鑾峰緱椤甸潰瀹炴椂婊氬姩鐨勪綅缃 // let end = $(document).scrollTop(); // // 濡傛粴鍔ㄧ殑浣嶇疆灏忎簬0锛屽垯浠h〃椤甸潰鍦ㄥ€掓暟绗簩灞忓悜涓婃粴锛岃繖涓椂鍊欏啀鏀瑰彉椤甸潰鐨勬粴鍔ㄦ柟寮 // if (end - start < 0) { // $.fn.fullpage.setAutoScrolling(true); // } // }) // } // }, // }) } var mySwiper1 = new Swiper('#swiper1', { init: false, loop: true, // autoplay: { // delay: 10000, // stopOnLastSlide: false, // disableOnInteraction: true // }, speed: 2000, // allowSlideNext: false, // allowSlidePrev: false, navigation: { nextEl: '.right', prevEl: '.left', }, pagination: { el: '.swiper-pagination', clickable: true, }, }); var mySwiper2 = new Swiper('#swiper2', { speed: 1000, effect: 'fade', pagination: { el: '.swiper-pagination2', }, }); $(".tabs_content_header li").mouseenter(function () { var i = $(this).index(); mySwiper2.slideTo(i); }) $('.sectionDown').click(function () { $(this).addClass('dianji') }) /**淇敼杞挱鏂瑰紡*/ $(".swiper-nav .swiper-slide").hover(function (e) { window.event ? window.event.cancelBubble = true : e.stopPropagation(); if (e.preventDefault) { e.preventDefault(); } else { window.event.returnValue == false; } $('.swiper-nav .active-nav').removeClass('active-nav') var activeNav = $(this).addClass('active-nav'); $('.iphight .swiper-slide').css({ "opacity": "0", "transition": "all 1000ms ease 0s", "z-index": "1", }) $('.iphight .swiper-slide').eq(activeNav.index()).css({ "opacity": "1", "z-index": "2", "transition": "all 1000ms ease 0s" }) }) /**淇敼杞挱鐐瑰嚮鏂瑰紡*/ $(".iphight .swiper-slide").click(function (e) { window.event ? window.event.cancelBubble = true : e.stopPropagation(); if (e.preventDefault) { e.preventDefault(); } else { window.event.returnValue == false; } var activeNav = $(this); $('.swiper-nav .swiper-slide').removeClass('active-nav'); $('.iphight .swiper-slide').css({ "opacity": "0", "transition": "all 1000ms ease 0s", "z-index": "1", }) if (activeNav.index() < $(".iphight .swiper-slide").length - 1) { $('.swiper-nav .swiper-slide').eq(activeNav.index() + 1).addClass('active-nav'); $('.iphight .swiper-slide').eq(activeNav.index() + 1).css({ "cursor": "pointer", "opacity": "1", "z-index": "2", "transition": "all 1000ms ease 0s" }) if (activeNav.index() >= 2 && $ww < 768) { $(".swiper-nav .swiper-wrapper").css({ "transform": "translate3d(" + -$('.swiper-nav .swiper-slide').width() * activeNav .index() + "px, 0px, 0px)" }) } } else { $('.swiper-nav .swiper-slide').eq(0).addClass('active-nav'); $('.iphight .swiper-slide').eq(0).css({ "cursor": "pointer", "opacity": "1", "z-index": "2", "transition": "all 1000ms ease 0s" }); $(".swiper-nav .swiper-wrapper").css({ "transform": "translate3d(0px, 0px, 0px)" }) } }); $(document).ready(function () { $('.inactive').click(function () { if ($(this).siblings('ul').css('display') == 'none') { $('.yiji').find('ul').each(function (e) { $(this).parent('li').children('a').removeClass('inactives'); $(this).slideUp(100); }); $(this).parent('li').siblings('li').removeClass('inactives'); $(this).addClass('inactives'); $(this).siblings('ul').slideDown(100).children('li'); } else { //鎺у埗鑷韩鍙樻垚+鍙 $(this).removeClass('inactives'); //鎺у埗鑷韩鑿滃崟涓嬪瓙鑿滃崟闅愯棌 $(this).siblings('ul').slideUp(100); //鎺у埗鑷韩瀛愯彍鍗曞彉鎴?鍙 $(this).siblings('ul').children('li').children('ul').parent('li').children('a').addClass( 'inactives'); //鎺у埗鑷韩鑿滃崟涓嬪瓙鑿滃崟闅愯棌 $(this).siblings('ul').children('li').children('ul').slideUp(100); //鎺у埗鍚岀骇鑿滃崟鍙繚鎸佷竴涓槸灞曞紑鐨勶紙-鍙锋樉绀猴級 $(this).siblings('ul').children('li').children('a').removeClass('inactives'); } }) }); $(".sele-box").hover(function () { //$(this).find('ul').slideDown(200); }, function () { //$(this).find('ul').slideUp(); if (!$(".header").hasClass('flag') && $("#header-search").hasClass('search-hide')) { // $(".header").removeClass('header_bg') $(".header").removeClass('menu-tep') } }); $(".header").hover(function () { }, function () { if ($(".sele-box").is(':hidden') && $("#header-search").hasClass('search-hide')) { if (!$(".header").hasClass('flag')) { $(".header").removeClass('header_bg') } } }); $('.nchild-close').click(function () { $(".nav-down-menuns").hide(); // $("#nchild-site").hide(); }) $('.zh_click').click(function () { setTimeout(function(){ $(".nav-down-menuns").hide(); $("#wapglobals").hide(); $("#clon1").css('display','inline-block'); $("#clone2").css('display','none'); },1000) }) $(".ygnav-li").hover(function () { const id = $(this).data('id'); const class_name = "#image" + id; console.log($(class_name)) $(class_name).addClass('phove'); let index = id - 4 swiperall.slideTo(index) }, function () { const id = $(this).data('id'); const class_name = "#image" + id; $(class_name).removeClass("phove"); }) $(".yiji>li>a").hover(function () { const id = $(this).data('id'); const class_name = "#tab" + id; console.log($(class_name)) $(".nav-solu").hide(); $(class_name).show(); }, function () { }) //鎼滅储 $(".search").on('click', function () { $("#header-search").removeClass("search-hide") $(".header").addClass("header_bg") $(".header_content_left_two").addClass("nav-hide"); $(".search").addClass("nav-hide"); $(".site-flag").addClass("nav-hide"); $(".navigation-v3").addClass("nav-hide"); $(".sele-box").slideUp(); }) $(".btn-close").on("click", function () { $("#header-search").addClass("search-hide") $(".header_content_left_two").removeClass("nav-hide"); $(".site-flag").removeClass("nav-hide"); $(".search").removeClass("nav-hide"); $(".navigation-v3").removeClass("nav-hide"); if (!$(".header").hasClass("flag")) { $(this).removeClass("header_bg") } }) var browser={ versions:function(){ var u = navigator.userAgent, app = navigator.appVersion; return {//绉诲姩缁堢娴忚鍣ㄧ増鏈俊鎭 trident: u.indexOf('Trident') > -1, //IE鍐呮牳 presto: u.indexOf('Presto') > -1, //opera鍐呮牳 webKit: u.indexOf('AppleWebKit') > -1, //鑻规灉銆佽胺姝屽唴鏍 gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //鐏嫄鍐呮牳 mobile: !!u.match(/AppleWebKit.*Mobile.*/), //鏄惁涓虹Щ鍔ㄧ粓绔 ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios缁堢 android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android缁堢鎴栬€卽c娴忚鍣 iPhone: u.indexOf('iPhone') > -1 , //鏄惁涓篿Phone鎴栬€匭QHD娴忚鍣 iPad: u.indexOf('iPad') > -1, //鏄惁iPad webApp: u.indexOf('Safari') == -1 //鏄惁web搴旇绋嬪簭锛屾病鏈夊ご閮ㄤ笌搴曢儴 }; }(), language:(navigator.browserLanguage || navigator.language).toLowerCase() }