$(document).ready(function(){ NProgress.start(); }); $(window).load(function(){ NProgress.done(); }); $(function(){ var nav=$(".header"); //寰楀埌瀵艰埅瀵硅薄 var win=$(window); //寰楀埌绐楀彛瀵硅薄 var sc=$(document);//寰楀埌document鏂囨。瀵硅薄銆 win.scroll(function(){ if(sc.scrollTop()>=80){ nav.addClass("bgwhite"); }else{ nav.removeClass("bgwhite"); } }) }); var swiper = new Swiper('.index_banner .swiper-container', { nextButton: '.index_banner .swiper-button-next', prevButton: '.index_banner .swiper-button-prev', pagination: '.index_banner .swiper-pagination', speed:500, paginationType: 'fraction' }); var swiper = new Swiper('.index_case .swiper-container', { pagination: '.index_case .swiper-pagination', paginationClickable: true, autoplay:3000, nextButton: '.index_case .swiper-button-next', prevButton: '.index_case .swiper-button-prev', speed:800, autoHeight: true, loop:true, breakpoints: { 1920: { spaceBetween:20, slidesPerView:'auto', centeredSlides : true, }, 768: { spaceBetween:20, slidesPerView:1 }, 640: { spaceBetween:20, slidesPerView:1 }, 414: { spaceBetween:20, slidesPerView:1 } } }); var swiper = new Swiper('.show_casefixed .box2 .swiper-container', { pagination: '.show_casefixed .box2 .swiper-pagination', paginationClickable: true, autoplay:3000, speed:800, autoHeight: true, breakpoints: { 1920: { spaceBetween:30, slidesPerView:2.5, }, 768: { spaceBetween:30, slidesPerView:1.8 }, 640: { spaceBetween:20, slidesPerView:1.3 }, 414: { spaceBetween:20, slidesPerView:1 } } }); var swiper = new Swiper('.show_casefixed .box4 .swiper-container', { pagination: '.show_casefixed .box4 .swiper-pagination', paginationClickable: true, autoplay:3000, speed:800, autoHeight: true, breakpoints: { 1920: { spaceBetween:30, slidesPerView:"auto" }, 768: { spaceBetween:30, slidesPerView:"auto" }, 640: { spaceBetween:20, slidesPerView:"auto" }, 414: { spaceBetween:20, slidesPerView:"auto" } } }); var swiper = new Swiper('.culture .swiper-container', { pagination: '.culture .swiper-pagination', paginationClickable: true, autoplay:3000, nextButton: '.culture .swiper-button-next', prevButton: '.culture .swiper-button-prev', speed:800, breakpoints: { 1920: { spaceBetween:24, slidesPerView:3 }, 768: { spaceBetween:24, slidesPerView:1.2 }, 640: { spaceBetween:24, slidesPerView:1.2 }, 414: { spaceBetween:24, slidesPerView:1.2 } } }); var swiper = new Swiper('.index_news .swiper-container', { pagination: '.index_news .swiper-pagination', paginationClickable: true, autoplay:3000, nextButton: '.index_news .swiper-button-next', prevButton: '.index_news .swiper-button-prev', speed:800, observer:true, observeParents:true, breakpoints: { 1920: { spaceBetween:30, slidesPerView:3 }, 768: { spaceBetween:20, slidesPerView:1 }, 640: { spaceBetween:20, slidesPerView:1 }, 414: { spaceBetween:20, slidesPerView:1 } } }); var swiper = new Swiper('.list_honor .swiper-container', { pagination: '.list_honor .swiper-pagination', paginationClickable: true, autoplay:3000, nextButton: '.list_honor .swiper-button-next', prevButton: '.list_honor .swiper-button-prev', speed:800, breakpoints: { 1920: { spaceBetween:30, slidesPerView:3.5 }, 768: { spaceBetween:20, slidesPerView:1 }, 640: { spaceBetween:20, slidesPerView:1 }, 414: { spaceBetween:20, slidesPerView:1 } } }); // 婊氬姩鏁板瓧 $('.counter').countUp(); // 瑙嗚宸彃浠 var rellax = new Rellax('.rellax'); // 杩斿洖椤堕儴 $("#goToTop").click(function(){ $('body,html').animate({scrollTop:0},1000); return false; }); baguetteBox.run('.gallery'); if (window.location.hash.indexOf('#') >= 0) { $('html,body').animate({ scrollTop: ($(window.location.hash).offset().top - 0) + "px" }, 1000); }; $(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 - 80; $('html,body').animate({ scrollTop: targetOffset }, 1000); return false; } } }); })