fontSize(); $(window).resize(function () { fontSize(); }); function fontSize() { var size; var winW = $(window).width(); if (winW <= 1450 && winW > 800) { size = Math.round(winW / 13.5); } else if (winW <= 800) { size = Math.round(winW / 7); if (size > 65) { size = 65; } } else { size = 100; } $('html').css({ 'font-size': size + 'px' }) } $(function () { if($(window).scrollTop() >= 50){ $("header").addClass("active"); $(".headerTwo").removeClass("active"); } else{ $("header").removeClass("active") } if($(window).scrollTop() >= 200){ $(".fudong").addClass("active"); } else{ $(".fudong").removeClass("active") } $(window).scroll(function(){ // 滚动条距离顶部的距离 大于 50px时 if($(window).scrollTop() >= 50){ $("header").addClass("active"); $(".headerTwo").addClass("active"); } else{ $("header").removeClass("active"); $(".headerTwo").removeClass("active"); } if($(window).scrollTop() >= 200){ $(".fudong").addClass("active"); } else{ $(".fudong").removeClass("active") } // if($(window).scrollTop() >= 510){ // $(".navigation").addClass("active"); // } else{ // $(".fudong").removeClass("active") // $(".navigation").removeClass("active"); // } }); $(".BMapLabel").addClass("active") var video = $("#videoPlay").get(0); $('.play').click(function () { video.play(); $(this).stop().hide(); }); $('.shiping').click(function () { $(this).stop().find(".play").toggleClass("active") }); // $(".panel-heading a").on("click",function(){ // $(this).addClass("active").parents(".panel").siblings().find("a").removeClass("active") // }); // $(".panel-title").on("click",function(){ // $(this).addClass("active").parent().parent().siblings().find(".panel-title").removeClass("active") // $(this).find("a").addClass("active").parent().parent().parent().siblings().find("a").removeClass("active") // $(this).find(".num").addClass("active").parent().parent().parent().parent().siblings().find(".num").removeClass("active") // }); // $('.panel a').click(function(){ // $(this).find("img").attr('src',$(this).find("img").attr('src')=='images/jia_46.png'?'images/jian_03.png':'images/jia_46.png'); // var imgpath=$(this).find("img").attr('src'); // if(imgpath=="images/jian_03.png") // $(this).parent().parent().parent().siblings().find(".shengqimg").attr('src',"images/jia_46.png"); // }); $(".panel-title").on("click",function(){ $(this).addClass("active").parent().parent().siblings().find(".panel-title").removeClass("active") $(this).find("a").addClass("active").parent().parent().parent().siblings().find("a").removeClass("active") $(this).find(".num").addClass("active").parent().parent().parent().parent().siblings().find(".num").removeClass("active") }); // $('.panel a').click(function(){ // var aa = $(this).find("input").val(); // console.log(aa) // if(aa==0){ // $(this).find("i").addClass("active").parent().parent().parent().parent().parent().siblings().find("i").removeClass("active");; // $(this).find("input").val(1).parent().parent().parent().parent().siblings().find("input").val(0); // }else { // $(this).find("i").removeClass("active"); // $(this).find("input").val(0); // } // }); // $('.panel a').click(function(){ // $(this).find("img").attr('src',$(this).find("img").attr('src')=='images/jia_13.png'?'images/jian_10.png':'images/jia_13.png'); // var imgpath=$(this).find("img").attr('src'); // if(imgpath=="images/jian_10.png") // $(this).parent().parent().parent().siblings().find(".shengqimg").attr('src',"images/jia_13.png"); // }); $(".case-main ul li").click(function () { $(".model").addClass("active"); $(".pop-up").addClass("active"); }) $(".pop-up .pic .close").click(function () { $(".model").removeClass("active"); $(".pop-up").removeClass("active"); }) // 手机版菜单 $('#header .search-btn').click(function () { $('.search-cover').addClass('active'); }); // web header搜索页面收起 $('.search-cover .close').click(function () { $('.search-cover').removeClass('active'); }); // 侧导航打开 $('.sj-menu').click(function () { $('#sidenav').addClass('active'); }); // 侧导航关闭 $('#sidenav .close-btn').click(function () { $('#sidenav').removeClass('active'); }); $('#sidenav .nav .level1').click(function () { $('#sidenav .nav .level1').removeClass('active'); $('#sidenav .nav .level1 a').removeClass('active'); if ($(this).next('ul').is(':visible')) { $('#sidenav .nav ul').stop().slideUp(500); } else { $(this).addClass('active'); $(this).find("a").addClass('active'); $('#sidenav .nav ul').stop().slideUp(500); $(this).next('ul').stop().slideDown(500); } }); $(function () { $(".culture ul li").click(function (){ $(this).addClass("active").siblings().removeClass("active"); $(this).find("a").addClass("active").parent().siblings().find("a").removeClass("active"); }) $("header .menuone > li a").hover(function () { var $this = $(this); $this.parents('header .menuone:first').find('li').find("a").removeClass('active'); $this.addClass('active'); var oindex = $(this).attr('oindex'); $('header .menutwo').hide(); $('header .menutwo[tindex="'+oindex+'"]').show(); }); $(".introduce .menuone > li").click(function () { var $this = $(this); $this.parents('.introduce-nav .menuone:first').find('li').removeClass('active'); $this.addClass('active'); var oindex = $(this).attr('oindex'); $('.introduce .menutwo').hide(); $('.introduce .menutwo[tindex="'+oindex+'"]').fadeIn() }) $(".itemFive .menuone > li").click(function () { var $this = $(this); $this.parents('.itemFive .menuone:first').find('li').removeClass('active'); $this.addClass('active'); $this.find("a").addClass('active'); var oindex = $(this).attr('oindex'); $('.itemFive .menutwo').hide(); $('.itemFive .menutwo[tindex="' + oindex + '"]').fadeIn(); }) }); //返回顶部 $(".backTop").click(function () { $("body,html").animate({scrollTop: 0}, 800) }); $("#globaldropdown").click(function () { $("#offices").toggleClass("active") }) $(".hidden-xs h4").click(function () { $(this).addClass("active").parent().siblings().find("h4").removeClass("active"); }) $(".search-box .moreTwo").click(function () { $(".search-box .list:nth-child(2) ul").toggleClass("active") }) // $(".search-box .list ul li").click(function () { // $(this).find(".submenu").addClass("active").parent().siblings().find(".submenu").removeClass("active"); // $(this).find("a img").addClass("active").parent().parent().siblings().find("a img").removeClass("active"); // // }) $('.search-box .list ul li').click(function(e){ var aa = $(this).find("input").val(); console.log(aa) if(aa==0){ $(this).find(".submenu").addClass("active").parent().siblings().find(".submenu").removeClass("active"); $(this).find("a img").addClass("active").parent().parent().siblings().find("a img").removeClass("active"); $(this).find("input").val(1).parent().parent().siblings().find("input").val(0); }else { $(this).find(".submenu").removeClass("active"); $(this).find("a img").removeClass("active"); $(this).find("input").val(0); } }); $(".search-box .list ul li a").click(function () { $(this).addClass("active").parent().siblings().find("a").removeClass("active"); }) $(".search-box .list ul li .submenu a").click(function (e) { $(this).addClass("active").siblings().removeClass("active"); e.stopPropagation(); }) $('.bellows__header').click(function(e){ var aa = $(this).find("input").val(); console.log(aa) $(this).removeClass("active"); if(aa==0){ $(this).next().slideDown() $(this).addClass("active").parent(".bellows__item").siblings().find(".bellows__header").removeClass("active"); $(this).parent(".bellows__item").addClass("bellows--is-open") $(".bellows__header").not(this).next().slideUp() $(".bellows__header").not(this).parent(".bellows__item").removeClass("bellows--is-open"); $(this).find("input").val(1).parent().parent().siblings().find("input").val(0); }else { $(this).parent(".bellows__item").removeClass("bellows--is-open") $(".bellows__header").removeClass("bellows--is-open"); $(this).next().slideUp() $(this).find("input").val(0); } }); }); $(function(){ //��鮋▲�� $("#top").click(function(){ $("body,html").animate({ scrollTop:0 },500); return false; }); //�ế�鱏�糓�炏�遬蝷箏�鮋▲�� $(window).scroll(function(){ var top = $(window).scrollTop(); if(top >= 20){ $("#top").fadeIn(); }else{ $("#top").fadeOut(); } }); //�ế�鱏瘚讛��膥�糓�炏�𣈲�� placeholder $(function(){ if(!placeholderSupport()){ $('[placeholder]').focus(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $(this); if (input.val() == '' || input.val() == input.attr('placeholder')) { input.addClass('placeholder'); input.val(input.attr('placeholder')); } }).blur(); }; }) function placeholderSupport() { return 'placeholder' in document.createElement('input'); } //蝘餃𢆡蝡臬紡�⏛ var body_top; var body_scroll = true; var body_time = null; $("#phone_but").click(function(e) { e.preventDefault(); if ($('body').hasClass('body_on')) { //�ế�鱏�孵稬撅訫�撖潸⏛憿菟𢒰蝳�甇X�𡁜𢆡 $(this).parents(".phone_nav").removeClass("phone_on"); $("body").removeClass("body_on"); $("html,body").scrollTop(body_top); clearTimeout(body_time); body_time = setTimeout(function(){body_scroll = true;},300); }else{ body_scroll = false; body_top = $(document).scrollTop(); $(this).parents(".phone_nav").addClass("phone_on"); $("body").addClass("body_on"); $("body").css("top",-body_top); }; }); $("#phone_ul").css('height',$(window).height()-60+"px"); $("#phone_ul li").each(function(){ var leng = $(this).find("ol").length; if(leng > 0){ $(this).children("a").after(""); } }); $('#phone_ul .a_zk').click(function(){ var aLi=$(this); if(aLi.next("ol").is(":hidden")){ aLi.next("ol").slideDown() aLi.addClass("a_zk_on") }else{ aLi.next("ol").slideUp() aLi.removeClass("a_zk_on") }; return false }); //憿菟𢒰�𢆡�𤫇 var wow = new WOW({ boxClass:'wow', animateClass:'animated', offset:200, mobile:false, live:true }); wow.init(); //��𧢲㦤-摨閖�典紡�⏛ $(function(){ var faq_lis=$(".footer .part2") var _width = $(window).width(); if(_width < 1002){ $(".footer .part2 dt").bind("click",function(){ var li=$(this) if(li.parent("dl").attr("class")=="one"){ faq_lis.find("dl").removeClass("one"); faq_lis.find("dd").slideUp(300); }else{ faq_lis.find("dl").removeClass("one"); li.parent("dl").addClass("one"); faq_lis.find("dd").slideUp(300); li.nextAll("dd").slideDown(300); }; }); } }); $('.index_banner').init(function(slick){ $('.index_banner .item.slick-current').addClass('active').siblings().removeClass('active') }) $('.index_banner').on('afterChange',function(slick,currentSlide){ $('.index_banner .item.slick-current').addClass('active').siblings().removeClass('active'); var _index = $('.index_banner').slick('slickCurrentSlide') $('.section1 .number span').eq(_index).addClass('active').siblings().removeClass('active') }) $('.section1 .number span').click(function(){ var _index = $(this).index(); $('.index_banner').slick('slickGoTo',_index); $(this).addClass("active").siblings().removeClass("active") }); $('.section1 .prev').click(function(){ $('.index_banner').slick('slickPrev') }) $('.section1 .next').click(function(){ $('.index_banner').slick('slickNext'); }); //导航 //超过一定高度导航添加类名 var nav=$("header"); //得到导航对象 var win=$(window); //得到窗口对象 var sc=$(document);//得到document文档对象。 win.scroll(function(){ if(sc.scrollTop()>=100){ nav.addClass("on"); }else{ nav.removeClass("on"); } }) //移动端展开nav $('#navToggle').on('click',function(){ $('.m_nav').addClass('open'); }) //关闭nav $('.m_nav .top .closed').on('click',function(){ $('.m_nav').removeClass('open'); }) //二级导航 移动端 // $(".m_nav .ul li").click(function() { // $(this).children("div.dropdown_menu").slideToggle('slow'); // $(this).find("i").addClass("active"); // $(this).siblings('li').children('.dropdown_menu').slideUp('slow'); // }); $('.m_nav .ul li').click(function(e){ var aa = $(this).find("input").val(); console.log(aa) if(aa==0){ $(this).children("div.dropdown_menu").slideToggle('slow'); $(this).find("i").addClass("active").parent().parent().siblings().find("i").removeClass("active"); $(this).find("a").addClass("active").parent().siblings().find("a").removeClass("active"); $(this).siblings('li').children('.dropdown_menu').slideUp('slow'); $(this).find("input").val(1).parent().parent().siblings().find("input").val(0); }else { $(this).children("div.dropdown_menu").slideToggle('slow'); $(this).find("i").removeClass("active"); $(this).find("a").removeClass("active"); $(this).find("input").val(0); } }); //全屏滚动 $('#index_main').fullpage({ 'navigation': true, slidesNavigation: true, controlArrows: false, continuousHorizontal:true, scrollingSpeed:1000, showActiveTooltip :true, anchors: ['hero', 'one', 'two', 'three', 'four', 'five'], loopHorizontal: true, afterLoad: function(anchorLink, index){ if(index == 1){ $('header').removeClass('on'); } if(index == 2){ $(".fudong").addClass("active"); $('header').addClass('on'); $('.section2 h3').addClass('animated fadeInUp active').css('animation-delay', '.1s'); $('.section2 p').addClass('animated fadeInUp active').css('animation-delay', '.2s'); $('.section2 li').addClass('animated fadeInUp active').css('animation-delay', '.3s'); } if(index == 3){ $(".fudong").addClass("active"); $('header').addClass('on'); $('.section3 h3').addClass('animated fadeInUp active').css('animation-delay', '.1s'); } if(index == 4){ $(".fudong").addClass("active"); $('header').addClass('on'); $('.section4 h3').addClass('animated fadeInUp active').css('animation-delay', '.1s'); $('.section4 p').addClass('animated fadeInUp active').css('animation-delay', '.3s'); } if(index == 5){ $(".fudong").addClass("active"); $('header').addClass('on'); $('.section5 h3').addClass('animated fadeInUp active').css('animation-delay', '.1s'); $('.section5 p').addClass('animated fadeInUp active').css('animation-delay', '.3s'); } if(index == 6){ $(".fudong").addClass("active"); $('header').addClass('on'); $('.section6 h3').addClass('animated fadeInUp active').css('animation-delay', '.1s'); $('.section6 p').addClass('animated fadeInUp active').css('animation-delay', '.3s'); $('.section6 .Copyright').removeClass('animated fadeInUp active').css('animation-delay', '.3s'); } }, onLeave: function(index, direction){ $(".fudong").removeClass("active") } }) }) //banner // $('.index_banner').slick({ // autoplay: true, // arrows: false, // dots:false, // infinite: true, // speed: 500, // autoplaySpeed: 5000, // pauseOnHover: false, // fade: true, // responsive: [ // { // breakpoint: 992, // settings: { // dots: true // } // } // ] // });