$("#player-first-name").html($(".play-tab-list.active video").text()) }, 0); }) $(".module-tab-item span").click(function(){ $("#player-first-name").html($(this).text()) }) $(".search-input").click(function () { $(".homepage,.searchbar-main").addClass("open"); }); $(".header-op-search").click(function () { $(".homepage,.searchbar-main").addClass("open"); $(".page,.searchbar-main").addClass("open"); }); $(document).click(function (e) { if ( ($(e.target).closest(".search-input").length == 0 || $(e.target).closest(".cancel-btn").length != 0) && $(e.target).closest(".header-op-search").length == 0 ) { $(e.target).closest(".header-op-search").length == 0; $(".homepage,.page,.searchbar-main").removeClass("open"); } }); $(".lazyload").lazyload({ effect: "fadeIn", skip_invisible: false, event: "sporty", threshold: 500, }); let index = $("#playSwiper .swiper-wrapper").find(".active").index(); let navIndex = $(".navbar .swiper-wrapper").find(".active").index(); const swiper = new Swiper("#playSwiper", { slidesPerView: "auto", hashNavigation: true, }); if (swiper.$el) { swiper.slideTo(index - 1); } const swiperNav = new Swiper(".navbar", { freeMode: true, slidesPerView: "auto", }); function initNavSwiper() { if (window.innerWidth < 559) { swiperNav.enable(); if (navIndex > 4) { swiperNav.slideTo(navIndex - 1); } return; } else { swiperNav.slideTo(0); swiperNav.disabl¡