상단 바로가기 본문 바로가기 하단 바로가기

기획전

쿠폰 받으세용

[여름블프] 1만원 할인쿠폰 외 10개
쿠폰 보기

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


02DAYS
:
12HRS
:
07MINS
:
32SECS
// 날짜 포맷팅 함수 ( yy.mm.dd ) function formatDate(dateString) { const date = new Date(dateString); const yy = date.getFullYear().toString().slice(-2); // 연도 마지막 두 자리 const mm = String(date.getMonth() + 1).padStart(2, '0'); // 월 (2자리) const dd = String(date.getDate()).padStart(2, '0'); // 일 (2자리) return `${yy}.${mm}.${dd}` } // 타이머 const targetDate = new Date(new Date().getFullYear(), 11, 31, 0, 0, 0).getTime(); // d-day 24.12.31 예)d-day 25.1.31 -> 12, 31, 0, 0, 0).getTime() function updateCountdown() { const now = new Date().getTime(); const remainingTime = targetDate - now; const days = Math.floor(remainingTime / (1000 * 60 * 60 * 24)); const hours = Math.floor((remainingTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((remainingTime % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((remainingTime % (1000 * 60)) / 1000); $('#days').html(`${days < 10 ? '0' : ''}${days}DAYS`); $('#hrs').html(`${hours < 10 ? '0' : ''}${hours}HRS`); $('#mins').html(`${minutes < 10 ? '0' : ''}${minutes}MINS`); $('#secs').html(`${seconds < 10 ? '0' : ''}${seconds}SECS`); } const interval = setInterval(updateCountdown, 1000); updateCountdown(); $(function(){ AOS.init(); const $scratch = $('#scratch'); let scratchSize = window.innerWidth > 768 ? 130 : 15; const img = new Image(); $scratch.wScratchPad('reset'); img. function () { $scratch.wScratchPad({ width: 791, height: 791, size : scratchSize, bg: 'asset/img/scratch_on.png', fg: 'asset/img/scratch_off.png', scratchDown : function(e, percent){ if($scratch.hasClass('done')){ $('#pop').off().fadeIn(400, fadeInCallback); } }, scratchMove : function(e, percent){ e.preventDefault(); if($scratch.hasClass('done')){ return false; } if(percent>30){ $('#pop').off().fadeIn(400, fadeInCallback); $scratch.addClass('done'); } } }).on('mousedown touchmove',function(e){ e.preventDefault(); }); }; img.src = 'asset/img/scratch_off.png'; $(window).on('resize', function () { let newSize = window.innerWidth > 768 ? 130 : 15; if (scratchSize !== newSize) { scratchSize = newSize; $scratch.wScratchPad('option', 'size', scratchSize); } }); const customCursor = document.getElementById('custom-cursor'); $scratch[0].addEventListener('touchstart', (e) => { const touch = e.touches[0]; customCursor.style.left = `${touch.clientX - 30}px`; customCursor.style.top = `${touch.clientY - 30}px`; customCursor.style.display = 'block'; }); $scratch[0].addEventListener('touchmove', (e) => { const touch = e.touches[0]; customCursor.style.left = `${touch.clientX - 30}px`; customCursor.style.top = `${touch.clientY - 30}px`; }); $scratch[0].addEventListener('touchend', () => { customCursor.style.display = 'none'; }); $('.pop-close').on('click', function(){ customCursor.style.display = 'none'; $('#pop').off().fadeOut(400); }); });