$(function(){ /* 부드러운 스크롤; */ /**$("html").easeScroll({ frameRate: 60, animationTime: 1200, stepSize: 50, pulseAlgorithm: !0, pulseScale: 7, pulseNormalize: 1, accelerationDelta: 40, accelerationMax: 1, keyboardSupport: !0, arrowScroll: 50 });**/ m41(); m73(); m82(); //호출 /*m11 simplyscroll*/ $(".m11 #logo_list").simplyScroll({ orientation: 'horizontal', // 좌우로 스크롤 direction: 'forwards', // 스크롤 방향 (뒤로 가려면 'backwards'로 설정) customClass: 'simply-scroll', // 스크롤링 요소에 사용할 클래스 이름 frameRate: 60, // 프레임 속도 speed: 1, // 스크롤 속도 auto: true, // 자동 스크롤링 활성화 autoMode: 'loop', // 자동 스크롤링 모드 (loop: 반복) pauseOnHover: true, }); /*m21 simplyscroll*/ /**$(".m21 #list_back").simplyScroll({ orientation: 'horizontal', // 좌우로 스크롤 direction: 'backwards', // 스크롤 방향 (뒤로 가려면 'backwards'로 설정) customClass: 'simply-scroll', // 스크롤링 요소에 사용할 클래스 이름 frameRate: 40, // 프레임 속도 speed: 2, // 스크롤 속도 auto: true, // 자동 스크롤링 활성화 autoMode: 'loop', // 자동 스크롤링 모드 (loop: 반복) pauseOnHover: true, });**/ /** $(".m21 #list_forw").simplyScroll({ orientation: 'horizontal', // 좌우로 스크롤 direction: 'forwards', // 스크롤 방향 (뒤로 가려면 'backwards'로 설정) customClass: 'simply-scroll', // 스크롤링 요소에 사용할 클래스 이름 frameRate: 40, // 프레임 속도 speed: 2, // 스크롤 속도 auto: true, // 자동 스크롤링 활성화 autoMode: 'loop', // 자동 스크롤링 모드 (loop: 반복) pauseOnHover: true, });**/ $(".m21 #scroller1").simplyScroll({ orientation: 'horizontal', // 좌우로 스크롤 direction: 'forwards', // 스크롤 방향 (뒤로 가려면 'backwards'로 설정) customClass: 'simply-scroll', // 스크롤링 요소에 사용할 클래스 이름 frameRate: 60, // 프레임 속도 speed: 2, // 스크롤 속도 auto: true, // 자동 스크롤링 활성화 autoMode: 'loop', // 자동 스크롤링 모드 (loop: 반복) pauseOnHover: true, }); /*m13 연혁*/ /* const scrollSecs = document.querySelectorAll(".m13 .section"); const scrolling = { enabled: true, events: "scroll,wheel,touchmove,pointermove".split(","), prevent: e => e.preventDefault(), disable() { if (scrolling.enabled) { scrolling.enabled = false; window.addEventListener("scroll", gsap.ticker.tick, {passive: true}); scrolling.events.forEach((e, i) => (i ? document : window).addEventListener(e, scrolling.prevent, {passive: false})); } }, enable() { if (!scrolling.enabled) { scrolling.enabled = true; window.removeEventListener("scroll", gsap.ticker.tick); scrolling.events.forEach((e, i) => (i ? document : window).removeEventListener(e, scrolling.prevent)); } } }; function goToSection(section, i) { if (scrolling.enabled) { // skip if a scroll tween is in progress scrolling.disable(); gsap.to(window, { scrollTo: {y: section, autoKill: false}, onComplete: scrolling.enable, duration: 1 }); } } scrollSecs.forEach((section, i) => { ScrollTrigger.create({ trigger: section, start: "top bottom-=1", end: "bottom top+=1", onEnter: () => goToSection(section), onEnterBack: () => goToSection(section), }); }); */ /*scrolltrigger*/ /**let tl = gsap.timeline({ scrollTtrigger : { trigger : '.animated-element', start: 'top center', end: 'bottom center', scrub: true, markers: true, toggleActions: 'play pause reverse complete', } }) tl.to('.animated-element', { x: -100, duration: 500, })**/ function m41(){ if(!$("#main").is(".m41")) return; $(".m41 .btn_wrap").click(function(){ $(this).next().stop().slideToggle(1000); $(this).toggleClass("on"); }); } /*m31 fashion*/ $(".m31 .f_list li .viewmore button").click(function(){ //var linkNum = $(this).data("link"); //console.log(linkNum); $(".popup").fadeIn(300); $(".dim").fadeIn(300); }); $(".m31 .l_list li .viewmore button").click(function(){ $(".popup").fadeIn(300); $(".dim").fadeIn(300); }); $(".x_btn").click(function(){ $(".popup").fadeOut(300); $(".dim").fadeOut(300); }); $(".dim").click(function(){ $(".popup").fadeOut(300); $(".dim").fadeOut(300); }); /*videopop*/ $(".m52 .tabcon2 .board_list li").click(function(){ $(".vpop").fadeIn(300); $(".vdim").fadeIn(300); }); $(".vpop .vclose").click(function(){ $(".vpop").fadeOut(300); $(".vdim").fadeOut(300); }); $(".vdim").click(function(){ $(".vpop").fadeOut(300); $(".vdim").fadeOut(300); }); $(document).ready(function () { $(".m21 .counter").counterUp({ delay: 10, time: 1200, }); }); //m72팝업창열기 $(".c_list li").click(function(){ //console.log("클릭"); $(".cpop").fadeIn(300); $(".cbg").fadeIn(300); }); $(".cpop .close").click(function(){ $(".cpop").fadeOut(300); $(".cbg").fadeOut(300); }); $(".cbg").click(function(){ $(".cpop").fadeOut(300); $(".cbg").fadeOut(300); }); // splitting() Splitting(); //m73 이메일 폼디비 function m73(){ if(!$("#main").is(".m73")) return; $("#selectEmail").change(function() { var selectedValue = $(this).val(); var emailInput = $("#f_email2"); if (selectedValue !== "1") { emailInput.val(selectedValue); } else { emailInput.val(""); // Clear the input box if 직접입력 is selected emailInput.focus(); // Move focus to the input box to start blinking cursor } }); } function m82(){ if(!$("#main").is(".m82")) return; $("#selectEmail2").change(function() { var selectedValue = $(this).val(); var emailInput = $("#f_email2"); if (selectedValue !== "1") { emailInput.val(selectedValue); } else { emailInput.val(""); // Clear the input box if 직접입력 is selected emailInput.focus(); // Move focus to the input box to start blinking cursor } }); } var ieswiper = new Swiper(".m22 .sec_ie", { effect : 'fade', fadeEffect: { crossFade: true }, speed : 1000, slidesPerView: 1, centeredSlides:true, navigation: { nextEl: ".ienext", prevEl: ".ieprev", }, }); });