$(function(){
/* 서브페이지에 탭 넣을 때 참고 ( 클래스 명 주의 )*/
$(".sub-tab-list li").click(function(){
var index = $(this).index();
$(".sub-tab-list li").removeClass("active")
$(this).addClass("active");
$(".sub-tab-con").hide()
$(".sub-tab-con").eq(index).fadeIn();
})
/* 서브페이지에 슬라이드 넣을 때 참고 ( 클래스 명 주의 ) */
$(".tech-slide").each(function(){
var $techSlide = $(this);
var $techSlideItem = $(this).find(".tech-slide-item");
var techNum = $techSlideItem.length;
var $techControls = $(".tech-slide-num")
$techControls.find('.paging-controls .total').text(techNum);
$techSlide.on('beforeChange', function(event, slick, currentSlide, nextSlide) {
$techControls.find('.paging-controls .cur').text(nextSlide + 1);
})
$techSlide.slick({
slidesToShow:1,
arrow:true,
dots:false,
infinite:false,
prevArrow: "",
nextArrow: "",
})
})
// gsap.registerPlugin(ScrollTrigger);
// const motion = gsap.timeline({
// scrollTrigger: {
// trigger: '.business-img-banner',
// start: 'top 15%',
// end: '+=1600', // 🔥 전체 스크롤 구간 늘림
// pin: true,
// scrub: 1,
// onUpdate(self) {
// // 이미지 애니메이션이 끝났을 때 텍스트 실행
// if (self.progress >= 0.6 && !self.textPlayed) {
// self.textPlayed = true;
// gsap.fromTo(".banner-txt-con",
// { opacity: 0, y: "-10%" },
// {
// opacity: 1,
// y: "0%",
// duration: 1,
// ease: "power1.out"
// }
// );
// }
// if (self.progress < 0.6 && self.textPlayed) {
// self.textPlayed = false;
// gsap.to(".banner-txt-con", {
// opacity: 0,
// y: "-10%",
// duration: 0.6,
// ease: "power1.in"
// });
// }
// }
// }
// });
// // 🔹 ① 박스는 앞쪽에서 빠르게 끝냄
// motion.fromTo(".banner-img-con",
// { width: "70%", left:"15%", right:"15%" },
// {
// width: "95%",
// left:"2.5%",
// right:"2.5%",
// ease: "none",
// duration: 1 // 🔥 실제 시간은 의미 없고 "구간 비율" 역할
// }
// );
// // 🔹 ② 아무것도 안 하는 구간 (형태 유지용)
// motion.to({}, { duration: 1 });
$(".main-business-slide").each(function () {
var $partnerSlide = $(this);
var $partnerSlideItem = $(this).find(".partner");
$partnerSlide.slick({
slidesToShow: 1,
autoplay: false,
dots: true,
arrows: false,
speed: 1000,
//infinite : true,
// centerMode: true,
// centerPadding: '150px',
pauseOnHover: false,
prevArrow: ".main-product-controls .prev-btn",
nextArrow: ".main-product-controls .next-btn",
customPaging: function (slider, i) {
const slideNum = $(slider.$slides[i]).data("title");
return (
'' +
slideNum +
''
);
},
responsive: [
{
breakpoint: 1500,
settings: {
arrows: false,
slidesToShow:3
},
},
{
breakpoint: 1240,
settings: {
arrows: false,
slidesToShow:2
},
},
{
breakpoint: 767,
settings: {
arrows: false,
slidesToShow: 1,
centerMode: false,
centerPadding: '0',
},
},
],
});
});
let = businessDots = $(".main-business-slide-con").find(".slick-dots");
$(".main-business-tab-menu-con").append(businessDots)
$(".js-tab-menu-con").find("li").click(function () {
let index = $(this).index();
$(".js-tab-menu-con").find("li").removeClass("active")
$(this).addClass("active")
$(".js-tab-con").hide()
$(".js-tab-con").eq(index).fadeIn()
})
})