//scrollT function scrollT($Dom){ if($(window).scrollTop()+$(window).height()>=$Dom.offset().top+200){ return true; } } document.body.addEventListener('touchstart', function(){}); $(function(){ //Js判断客户端是否为PC还是手持欧宝官方网址下载 function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); var flag = true; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } } return flag; } /*//niceScroll $('html').niceScroll({ cursorcolor: "#bbb",//#CC0071 光标颜色 cursoropacitymax: 1, //改变不透明度非常光标处于活动状态(scrollabar“可见”状态),范围从1到0 touchbehavior: false, //使光标拖动滚动像在台式电脑触摸欧宝官方网址下载 cursorwidth: "8px", //像素光标的宽度 cursorborder: "0", // 游标边框css定义 cursorborderradius: "5px",//以像素为光标边界半径 background:"#fff", zindex:1005, autohidemode: false //是否隐藏滚动条 });*/ //back_top $('.back_top').click(function(){ $('html,body').animate({scrollTop: '0'}, 800); }); //header $(window).scroll(function() { if($(window).scrollTop() >= 100 ){ $('header').addClass("header_scr"); }else{ $('header').removeClass("header_scr"); } }); /*nav*/ var qcloud={}; $('[_t_nav]').hover(function(){ 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_cur'); }); $('#'+_nav).stop(true,true).slideDown(500); }, 150); },function(){ var _nav = $(this).attr('_t_nav'); clearTimeout( qcloud[ _nav + '_timer' ] ); qcloud[ _nav + '_timer' ] = setTimeout(function(){ $('[_t_nav]').removeClass('nav_cur'); $('#'+_nav).stop(true,true).slideUp(300); }, 150); }); //nav_phone $(".nav_list a.n_p_a0").click(function(){ $(this).toggleClass("on").siblings(".nav_list a.n_p_a0").removeClass("on"); // 修改数字控制速度, slideUp(500)控制卷起速度 $(this).next(".n_p_subclass").slideToggle().siblings(".n_p_subclass").slideUp(); }); //sou_ico==phone $(".sou_ico").click(function(){ $(".sou_warp").fadeToggle(); }); $(".sou_bg").click(function(){ $(".sou_warp").fadeOut(); $(".sou_ico").removeClass("sou_cur"); }); $(".sou_closed").click(function(){ $(this).parent().fadeOut(); $(".sou_ico").removeClass("sou_cur"); }); //about_links var headerH = $("header").height(); var bannerH = $(".banner_wrap").height(); $(window).scroll(function() { if($(window).scrollTop() >= bannerH ){ $('.about_links').addClass("links_scr").css({ 'top': headerH - 30 +'px', }); }else{ $('.about_links').removeClass("links_scr").css({ 'top': 0 +'px', }); } }); //menu_ico $(".menu_ico").click(function(){ $(this).toggleClass("menu_active"); $(".header_r").fadeToggle(); }); //banner_txt $(".banner_img").addClass("wow owl-fadeUp-in").css({ 'animation-delay': 0.1 +'s', 'animation-duration': 2 +'s', }); $(".banner_txt h3").addClass("wow fadeInUp").css({ 'animation-delay': 0.3 +'s', 'animation-duration': 2 +'s', }); $(".banner_txt p").addClass("wow fadeInUp").css({ 'animation-delay': 0.5 +'s', 'animation-duration': 2 +'s', }); /*title_02*/ $(".title02").addClass("wow fadeInDown").css({ 'animation-delay': 0.1 +'s', 'animation-duration': 2 +'s', }); /*title05 */ $(".title05").addClass("wow fadeInDown").css({ 'animation-delay': 0.1 +'s', 'animation-duration': 2 +'s', }); /*title_06*/ $(".title06").addClass("wow fadeInDown").css({ 'animation-delay': 0.1 +'s', 'animation-duration': 2 +'s', }); //theme_common $(".theme_common").owlCarousel({ items: 3, margin:56, mouseDrag:false, autoplay: true, autoplayTimeout:5000, autoplayHoverPause:true, smartSpeed:500, nav: true, dots: true, loop: false, responsive: { 0: { items: 1, margin:16, }, 768: { items: 2, margin:26, }, 992: { items: 3, margin:36, }, 1600: { items: 3, margin:56, } } }); //industry_swiper $(".pro_classify li").each(function( index ) { $(this).addClass("wow fadeInUp").css({ 'animation-delay': (index/10)+'s', 'animation-duration': 2 +'s' }); }); //关于同有--公司介绍==nav_item0 $('a.anchor[href*=#]').click(function(){ if(location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname){ var $target = $(this.hash); var headerH = $("header").height(); var linksH = $(".about_links").height(); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetOffset = $target.offset().top - headerH - linksH; $("a.anchor").parent("li").removeClass("anchor_cur"); $(this).parent("li").addClass("anchor_cur"); $('html,body').animate({ scrollTop: targetOffset }, 1000); return false; } } }); }); //wow if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) { new WOW().init(); }; var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset:0, live: true, mobile: true }); wow.init();