$(function() { if (window.location.href.split('?').length > 1) { var url = window.location.href.split('?')[1].split('=')[1] $('.scroll').each(function() { if ($(this).attr('cname') == decodeURI(url)) { $("html,body").animate({ scrollTop: $(this).offset().top-100 }, 300); } }) } if($('.swiper-wrapper .swiper-slide').length==0) $('.swiper-news').remove() $('.play_icon').click(function() { var url = $(this).attr('vhref') //$('#myvideo source').attr('src', url) videojs("myvideo").ready(function() { 聽聽 聽聽聽 聽聽聽 聽聽聽 myPlayer = this; 聽聽 聽聽聽 聽聽聽 聽聽聽 聽myPlayer.src(url); /*鍔ㄦ€佽缃畍ideo.js鎾斁鐨勫湴鍧€銆?/ $('.video_wrapper').show() 聽聽 聽聽聽 聽聽聽 聽聽聽 聽myPlayer.play(); 聽聽 聽聽聽 聽}); }) $('.cover').click(function(){ $(this).parent().find('.play').trigger('click') }) $('.video_wrapper .close').click(function(){ $('.video_wrapper').hide() myPlayer.pause() }) $('.list_more').click(function() { $(this).hide() $('.core_channer li').show() $('.medial_nav li').show() init_height() }) var sc=5; if ($(window).width() < 1000) { sc=1 } //鏂伴椈 var swiper = new Swiper('.swiper-news', { slidesPerView: 1, spaceBetween: 0, watchSlidesVisibility: true, navigation: { nextEl: '.swiper-button-next-self', prevEl: '.swiper-button-prev-self', }, pagination: { el: '.swiper-pagination', clickable: true, }, }); var swiper = new Swiper('.index_culture-container', { slidesPerView: sc, spaceBetween: 0, //watchSlidesVisibility: true, centeredSlides: true, loop:true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, //loop: false, on: { /*init: function() { }, transitionStart: function(swiper) { },*/ transitionEnd: function(swiper) { } }, scrollbar: { el: '.swiper-scrollbar', hide: false, }, }); var swiper = new Swiper('.index_culture-container-mobile', { slidesPerView: sc, spaceBetween: 0, //watchSlidesVisibility: true, centeredSlides: true, loop:true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, //loop: false, on: { /*init: function() { }, transitionStart: function(swiper) { },*/ transitionEnd: function(swiper) { } }, scrollbar: { el: '.swiper-scrollbar', hide: false, }, }); })