// JavaScript Document $(document).ready(function(){ //导航 jQuery(window).scroll(function() { if($(window).scrollTop() >= 20){ $('.header').addClass("header_scr"); $('.main').css("padding-top","70px"); $('.naverji').css("top","70px"); $('.sok').css("top","70px"); }else{ $('.header').removeClass("header_scr"); $('.main').css("padding-top","90px"); $('.naverji').css("top","90px"); $('.sok').css("top","90px"); } }); //首页focus $('.focus').flexslider({ directionNav: true, pauseOnAction: false }); $('.p_sort_list li').eq(0).addClass("p_sort_first"); //置顶 jQuery(window).scroll(function() { if(jQuery(window).scrollTop() >= 100){ jQuery('.float a.back_top img').fadeIn(500); }else{ jQuery('.float a.back_top img').fadeOut(500); } }); jQuery('.float a.back_top img').click(function(){jQuery('html,body').animate({scrollTop: '0px'}, 500);}); }); $(function(){ $('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; } } }); }) //发展历程选项卡 $(document).ready(function(e) { $(".fzlcM2 .fzlcM2_1").hide();//内容全部隐藏 $(".fzlcM2 .fzlcM2_1:eq(0)").show();//第一个内容显示 //按钮点击动作 $(".fzlcM1 .fzlcM1nr .bd ul li").click(function(){ $(".fzlcM1 .fzlcM1nr .bd ul li").removeClass("lidqp"); $(this).addClass("lidqp"); var i = $(this).index(); $(".fzlcM2 .fzlcM2_1").hide();//内容全部隐藏 $(".fzlcM2 .fzlcM2_1:eq("+i+")").show();//第几个内容显示 }) }); // wow if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ new WOW().init(); }; //图片缓缓出现 jQuery(function() { jQuery("img").lazyload({effect: "fadeIn"}); }); // 荣誉资质 $(document).ready(function(e) { var sync1 = $("#sync1"); var sync2 = $("#sync2"); if ($("#sync1").size() > 0) { sync1.owlCarousel({ singleItem: true, slideSpeed: 1000, navigation: true, pagination: true, afterAction: syncPosition, responsiveRefreshRate: 200, loop: true, rewindNav: true, pagination: false, navigationText: false, }); } if ($("#sync2").size() > 0) { sync2.owlCarousel({ items: 5, itemsDesktop: [1199, 10], itemsDesktopSmall: [979, 10], itemsTablet: [768, 8], itemsMobile: [479, 4], pagination: false, rewindNav: true, scrollPerPage: true, responsiveRefreshRate: 100, navigationText: false, loop: true, afterInit: function (el) { el.find(".owl-item").eq(0).addClass("synced"); } }); } function syncPosition(el){ var current = this.currentItem; $("#sync2") .find(".owl-item") .removeClass("synced") .eq(current) .addClass("synced") if($("#sync2").data("owlCarousel") !== undefined){ center(current) } } $("#sync2").on("click", ".owl-item", function(e){ e.preventDefault(); var number = $(this).data("owlItem"); sync1.trigger("owl.goTo",number); }); function center(number){ var sync2visible = sync2.data("owlCarousel").owl.visibleItems; var num = number; var found = false; for(var i in sync2visible){ if(num === sync2visible[i]){ var found = true; } } if(found===false){ if(num>sync2visible[sync2visible.length-1]){ sync2.trigger("owl.goTo", num - sync2visible.length+2) }else{ if(num - 1 === -1){ num = 0; } sync2.trigger("owl.goTo", num); } } else if(num === sync2visible[sync2visible.length-1]){ sync2.trigger("owl.goTo", sync2visible[1]) } else if(num === sync2visible[0]){ sync2.trigger("owl.goTo", num-1) } } }); // 解决方案引导页 $(function(){ $('.jjfaul1 li a').hover(function(){ $('span',this).stop().css('height','1px'); $('span',this).animate({ left:'0', width:'100%', right:'0' },200); },function(){ $('span',this).stop().animate({ left:'50%', width:'0' },200); }); }); // 解决方案内页 $(function(){ $('.zdhwxqM1nrB li a').hover(function(){ $('span',this).stop().css('height','1px'); $('span',this).animate({ left:'0', width:'100%', right:'0' },200); },function(){ $('span',this).stop().animate({ left:'50%', width:'0' },200); }); }); // input 单选 美化 $(document).ready(function(e) { $(".pay_list_c1").on("click",function(){ $(this).addClass("on").siblings().removeClass("on"); }) }); // 解决方案 //$(document).ready(function(){ // $('.jjfaUL>li>a').click(function(e) { // $(this).next('.jjfaulerji').stop().slideToggle(); // }); // $('.jjfaulerji>li>a').click(function(e) { // $(this).next('.ulsanji').stop().slideToggle(); // }); // }); $(document).ready(function () { $('.jjfaUL>li').click(function (e) { $(this).find('.jjfaulerji').slideDown().parent().siblings().find('.jjfaulerji').slideUp(); }); $('.jjfaulerji>li').click(function (e) { $(this).find('.ulsanji').slideDown().parent().siblings().find('.ulsanji').slideUp(); }); });