//fixed-nav $(document).on("scroll",function(){ if($(document).scrollTop()>20){ $("header").removeClass("large").addClass("small"); } else{ $("header").removeClass("small").addClass("large"); } }); //search $(function(){ $(".attr-nav").each(function(){ $(".search", this).on("click", function(e){ e.preventDefault(); $(".top-search").slideToggle(); $('.top_overly').fadeIn(100); }); }); $(".input-group-addon.close-search").on("click", function(){ $(".top-search").slideUp(); $('.top_overly').fadeOut(100); }) }) //back-top $(function(){ $(window).scroll(function(){ var _top = $(window).scrollTop(); if(_top>300){ $('.back_top').fadeIn(600); }else{ $('.back_top').fadeOut(600); } }); $(".back_top").click(function(){ $("html,body").animate({scrollTop:0},500); }); }); /*fixed contact*/ (function( window , document ){ 'use strict'; var hotcss = {}; (function() { var viewportEl = document.querySelector('meta[name="viewport"]'), hotcssEl = document.querySelector('meta[name="hotcss"]'), dpr = window.devicePixelRatio || 1, maxWidth = 640, designWidth = 0; document.documentElement.setAttribute('data-dpr', dpr); hotcss.dpr = dpr; document.documentElement.setAttribute('max-width', maxWidth); hotcss.maxWidth = maxWidth; if( designWidth ){ document.documentElement.setAttribute('design-width', designWidth); hotcss.designWidth = designWidth; } })(); hotcss.px2rem = function( px , designWidth ){ if( !designWidth ){ designWidth = parseInt(hotcss.designWidth , 10); } return parseInt(px,10)*640/designWidth/20; } hotcss.rem2px = function( rem , designWidth ){ if( !designWidth ){ designWidth = parseInt(hotcss.designWidth , 10); } return rem*20*designWidth/640; } hotcss.mresize = function(){ var innerWidth = document.documentElement.getBoundingClientRect().width || window.innerWidth; if( hotcss.maxWidth && (innerWidth/hotcss.dpr > hotcss.maxWidth) ){ innerWidth = hotcss.maxWidth*hotcss.dpr; } if( !innerWidth ){ return false;} document.documentElement.style.fontSize = ( innerWidth*20/640 ) + 'px'; }; hotcss.mresize(); window.addEventListener( 'resize' , function(){ clearTimeout( hotcss.tid ); hotcss.tid = setTimeout( hotcss.mresize , 400 ); } , false ); window.addEventListener( 'load' , hotcss.mresize , false ); setTimeout(function(){ hotcss.mresize(); },333) window.hotcss = hotcss; })( window , document ); (function($){ var mainWit = $(window).width(), mainHit = $(window).height(), carouselBar = $(".page-header-bar"), fixedContact = $(".fixed-contact"); /*fixed-contact*/ $(".fixed-contact").hover(function(){ $(this).addClass("active"); },function(){ $(this).removeClass("active"); }); $(window).scroll(function() { if($(window).width() > 992){ if ($(this).scrollTop() > mainHit/2 ){ carouselBar.addClass("active"); fixedContact.addClass("show"); } else { carouselBar.removeClass("active"); fixedContact.removeClass("show"); } } }); })(jQuery); //fixed inquiry $(document).ready(function(){ $("#floatShow").bind("click",function(){ $("#onlineService").animate({ height:"show", opacity:"show" }, "normal" ,function(){ $("#onlineService").show(); }); $("#floatShow").attr("style","display:none;opacity: 0"); $("#floatHide").attr("style","display:block;opacity: 1"); return false; }); $("#floatHide").bind("click",function(){ $("#onlineService").animate({ height:"hide", opacity:"hide" }, "normal" ,function(){ $("#onlineService").hide(); }); $("#floatShow").attr("style","display:block;opacity: 1"); $("#floatHide").attr("style","display:none;opacity: 0"); return false; }); }); $(function(){ $('.autoplay3').slick({ infinite: true, speed: 1500, slidesToShow: 3, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, pauseOnHover:true, responsive: [ { breakpoint: 1200, settings: { slidesToShow:2, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, infinite: true, } }, { breakpoint: 400, settings: { slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, } } ] }) }) $(function(){ $('.autoplay2').slick({ infinite: true, speed: 1500, slidesToShow: 2, slidesToScroll: 1, autoplay: true, autoplaySpeed:1500, pauseOnHover:true, responsive: [ { breakpoint: 992, settings: { slidesToShow:2, slidesToScroll: 1, autoplay: true, autoplaySpeed:1500, infinite: true, } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed:1500, } } ] }) }) $(function(){ $('.center03').slick({ centerMode: true, centerPadding: '0', slidesToShow: 3, dots:true, responsive: [ { breakpoint: 768, settings: { centerMode: true, centerPadding: '0', slidesToShow:1, dots:true, } }, { breakpoint:600, settings: { centerMode: true, centerPadding: '0', slidesToShow:1, dots:true, } } ] }) }) $(function(){ $('.autoplay4').slick({ infinite: true, speed: 1500, slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, pauseOnHover:false, responsive: [ { breakpoint: 992, settings: { slidesToShow:3, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, infinite: true, dots:true, } }, { breakpoint: 768, settings: { slidesToShow:2, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, infinite: true, dots:true, } }, { breakpoint: 440, settings: { slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, dots:true, } } ] }) }) $(function(){ $('.autoplay1').slick({ infinite: true, speed: 1500, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed:3000, pauseOnHover:false, }) }) //faq var action = 'click'; var speed = "500"; //Document.Ready $(document).ready(function(){ //Question handler $('li.question').on(action, function(){ //gets next element //opens .a of selected question $(this).next().slideToggle(speed) //selects all other answers and slides up any open answer .siblings('li.answer').slideUp(); //Grab img from clicked question var img = $(this).children('div.column'); //Remove Rotate class from all images except the active $('div.column').not(img).removeClass('rotate'); //toggle rotate class img.toggleClass('rotate'); });//End on click });//End Ready //select $(function(){ $(".language_select").each(function(){ var s=$(this); var z=parseInt(s.css("z-index")); var dt=$(this).children("dt"); var dd=$(this).children("dd"); var _show=function(){dd.slideDown(200);dt.addClass("cur");dd.addClass("open");s.css("z-index",z+1);}; //展开效果 var _hide=function(){dd.slideUp(200);dt.removeClass("cur");dd.removeClass("open");s.css("z-index",z);}; //关闭效果 dt.click(function(){dd.is(":hidden")?_show():_hide();}); dd.find("a").click(function(){dt.html($(this).html());_hide();}); //选择效果(如需要传值,可自定义参数,在此处返回对应的“value”值 ) $("body").click(function(i){ !$(i.target).parents(".language_select").first().is(s) ? _hide():"";}); }) }) /*service*/ $(function(){ $(".service ul li").hover(function(){ $(this).find(".sidebox").stop().animate({"width":"240px"},100).css({"opacity":"1","filter":"Alpha(opacity=100)"}) },function(){ $(this).find(".sidebox").stop().animate({"width":"48px"},100).css({"opacity":"1","filter":"Alpha(opacity=100)"}) }); }); $(function($) { var $nav = $('#main-nav'); var $toggle = $('.toggle'); var defaultData = { maxWidth: false, customToggle: $toggle, levelTitles: true }; // we'll store our temp stuff here var $clone = null; var data = {}; // calling like this only for demo purposes const initNav = function(conf) { if ($clone) { // clear previous instance $clone.remove(); } // remove old toggle click event $toggle.off('click'); // make new copy $clone = $nav.clone(); // remember data $.extend(data, conf) // call the plugin $clone.hcMobileNav($.extend({}, defaultData, data)); } // run first demo initNav({}); $('.actions').find('a').on('click', function(e) { e.preventDefault(); var $this = $(this).addClass('active'); var $siblings = $this.parent().siblings().children('a').removeClass('active'); initNav(eval('(' + $this.data('demo') + ')')); }); }); $(function(){ $('.main-more a[href*=#],area[href*=#]').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetOffset = $target.offset().top; $('html,body').animate({ scrollTop: targetOffset }, 1000); return false; } } }); }) //cate_section $(document).ready(function () { $(".cate_img ul li").hover(function () { $(".nav_img ul li").removeClass("current"); $i = $(this).index(); $(this).addClass("current"); top1 = -$i * 500; $(".cate_ul ul").stop(true, false).animate({"top": top1},0); }); }); $(function( ) { setInterval(function(){ if($(".animated-circles").hasClass("animated")){ $(".animated-circles").removeClass("animated"); }else{ $(".animated-circles").addClass('animated'); } },3000); var wait = setInterval(function(){ $(".livechat-hint").removeClass("show_hint").addClass("hide_hint"); clearInterval(wait); },4500); $(".livechat-girl").hover(function(){ clearInterval(wait); $(".livechat-hint").removeClass("hide_hint").addClass("show_hint"); },function(){ $(".livechat-hint").removeClass("show_hint").addClass("hide_hint"); }).click(function(){ }); }); /*nav_li*/ $(function(){ $('.fl_list ul li').mouseover(function(){ $(this).addClass('current').siblings().removeClass('current') var num=$(this).index() $('.pro_son').eq(num).show().siblings().hide() }) var num=$(this).index() $(".list3").mouseleave(function(){ $('.pro_son').eq(num).show().siblings().hide() }) }) $(function(){ (function( window , document ){ 'use strict'; var hotcss = {}; (function() { var viewportEl = document.querySelector('meta[name="viewport"]'), hotcssEl = document.querySelector('meta[name="hotcss"]'), dpr = window.devicePixelRatio || 1, maxWidth = 640, designWidth = 0; document.documentElement.setAttribute('data-dpr', dpr); hotcss.dpr = dpr; document.documentElement.setAttribute('max-width', maxWidth); hotcss.maxWidth = maxWidth; if( designWidth ){ document.documentElement.setAttribute('design-width', designWidth); hotcss.designWidth = designWidth; } })(); hotcss.px2rem = function( px , designWidth ){ if( !designWidth ){ designWidth = parseInt(hotcss.designWidth , 10); } return parseInt(px,10)*640/designWidth/20; } hotcss.rem2px = function( rem , designWidth ){ if( !designWidth ){ designWidth = parseInt(hotcss.designWidth , 10); } return rem*20*designWidth/640; } hotcss.mresize = function(){ var innerWidth = document.documentElement.getBoundingClientRect().width || window.innerWidth; if( hotcss.maxWidth && (innerWidth/hotcss.dpr > hotcss.maxWidth) ){ innerWidth = hotcss.maxWidth*hotcss.dpr; } if( !innerWidth ){ return false;} document.documentElement.style.fontSize = ( innerWidth*20/640 ) + 'px'; }; hotcss.mresize(); window.addEventListener( 'resize' , function(){ clearTimeout( hotcss.tid ); hotcss.tid = setTimeout( hotcss.mresize , 400 ); } , false ); window.addEventListener( 'load' , hotcss.mresize , false ); setTimeout(function(){ hotcss.mresize(); },333) window.hotcss = hotcss; })( window , document ); (function($){ var mainWit = $(window).width(), mainHit = $(window).height(), carouselBar = $(".page-header-bar"), fixedContact = $(".fixed-contact"); /*fixed-contact*/ $(".fixed-contact").hover(function(){ $(this).addClass("active"); },function(){ $(this).removeClass("active"); }); $(window).scroll(function() { if($(window).width() > 992){ if ($(this).scrollTop() > mainHit/2 ){ carouselBar.addClass("active"); fixedContact.addClass("show"); } else { carouselBar.removeClass("active"); fixedContact.removeClass("show"); } } }); })(jQuery); })