$(function () { $('.tab_head ul li').click(function () { $(this).addclass("active").siblings().removeclass("active"); var index = $('.tab_head ul li').index($(this)); $('.tab_content ul li.tab_content_li').eq(index).show().siblings().hide(); }); $('.tab_head1 ul li').hover(function () { $(this).addclass("active").siblings().removeclass("active"); var index = $('.tab_head1 ul li').index($(this)); $('.tab_content1 ul li.tab_content_li').eq(index).show().siblings().hide(); }); //閬嶅巻bn $(".swiper-wrapper-bn .swiper-slide").each(function () { var bg = $(this).find(".bnimg").data("background"); $(this).find(".bnimg").css({ "background": 'url(' + bg + ')' }) }); $(".whead i").click(function () { $(".wapnav").addclass("wapnav_active"); $(".wpnvbg").addclass("wpnvbg_active"); }) $(".wapnavtop i").click(function () { $(".wapnav").removeclass("wapnav_active"); $(".wpnvbg").removeclass("wpnvbg_active"); }) $(".whead i").click(function () { $(".wapnav").addclass("wapnav_active"); $(".wpnvbg").addclass("wpnvbg_active"); }) $(".wpnvbg").click(function () { $(".wapnav").removeclass("wapnav_active"); $(".wpnvbg").removeclass("wpnvbg_active"); }) $(".wapprda").click(function () { //$(".wpheadhide").slideup(); $(".wpheadhide").css("display", "none"); $(this).siblings(".wpheadhide").slidedown(); //$(this).siblings(".wpheadhide").css("display", "block"); }) $(".wapprda1").click(function () { $(this).siblings(".wpheadhide1").slidetoggle(); }) /*$(".fidbox_top").click(function(){ $("html,body").animate({scrolltop:"0px"},500); });*/ var swiper = new swiper('.swiper-container-bn', { navigation: { nextel: '.swiper-button-next-bn', prevel: '.swiper-button-prev-bn', }, //effect: 'fade', pagination: { el: '.swiper-pagination', clickable: true, }, loop: true, }); $(".hdrsc_click").click(function () { $(this).siblings(".schide").toggleclass("schide_active") }) //瑙嗛鎾斁 var video = document.getelementbyid("video"); $(".bn_video").click(function () { var datasrc = $(this).data("video"); $(video).attr("src", datasrc); var phtml = $(this).data("txt"); $(".videohidebox_1 p").html(phtml); $(".videohide").addclass("videohide_class") $(".videohidebox").addclass("videohidebox_class"); video.play(); }) $(".videohidebg,.videohidebox i").click(function () { $(".videohide").removeclass("videohide_class") $(".videohidebox").removeclass("videohidebox_class"); video.load(); }) var hy3l = new swiper('.swiper-container-hy3l', { direction: 'vertical', spacebetween: 10, slidesperview: 3, freemode: true, loopedslides: 5, watchslidesvisibility: true, watchslidesprogress: true, breakpoints: { 950: { direction: 'horizontal', slidesperview: 2, } } }); var hy3r = new swiper('.swiper-container-hy3r', { spacebetween: 0, loopedslides: 5, navigation: { nextel: '.swiper-button-next-hy3', prevel: '.swiper-button-prev-hy3', }, thumbs: { swiper: hy3l, }, }); var swiper = new swiper('.swiper-container-m4', { loop: true, navigation: { nextel: '.swiper-button-next-m4', prevel: '.swiper-button-prev-m4', }, }); if ($(window).width() > 950) { navpc(); } else { navwap(); } function navpc() { } function navwap() { } })