← back to jiho5755-maker__pressco21

Function bodies 302 total

All specs Real LLM only Function bodies
initLoginToggle function · javascript · L4-L80 (77 LOC)
1초 로그인(킵그로우)/구매시 로그인/js.js
    function initLoginToggle() {
        if (typeof jQuery === 'undefined') {
            setTimeout(initLoginToggle, 100);
            return;
        }

        jQuery(document).ready(function($){
            // 토글 기능 - #simpleLogin 안의 .mlog-sign를 보여주기
            $("#toggleTraditionalLogin").on("click", function(e){
                e.preventDefault();
                $(this).toggleClass("active");
                $("#simpleLogin .mlog-sign").toggleClass("show-traditional");

                var isExpanded = $("#simpleLogin .mlog-sign").hasClass("show-traditional");
                $(this).attr("aria-expanded", isExpanded ? "true" : "false");

                // 토글이 열릴 때 첫 번째 입력 필드에 포커스
                if (isExpanded) {
                    setTimeout(function() {
                        $("#simpleLogin .mlog-sign input:first").focus();
                    }, 300);
                }
                return false;
            });

            // 엔터키 로그인 기능
            $("#simpleLogin .m
initAutocomplete function · javascript · L83-L94 (12 LOC)
1초 로그인(킵그로우)/구매시 로그인/js.js
    function initAutocomplete() {
        var idInput = document.querySelector('#loginWrap input[name="id"]');
        var pwInput = document.querySelector('#loginWrap input[name="passwd"]');
        if (idInput) idInput.setAttribute('autocomplete', 'email');
        if (pwInput) pwInput.setAttribute('autocomplete', 'current-password');

        // 주문조회 비회원 폼
        var nameInput = document.querySelector('#loginWrap input[name="order_name"]');
        var orderInput = document.querySelector('#loginWrap input[name="order_id"]');
        if (nameInput) nameInput.setAttribute('autocomplete', 'name');
        if (orderInput) orderInput.setAttribute('autocomplete', 'off');
    }
initPasswordToggle function · javascript · L97-L123 (27 LOC)
1초 로그인(킵그로우)/구매시 로그인/js.js
    function initPasswordToggle() {
        var pwInput = document.querySelector('#loginWrap input[name="passwd"]');
        if (!pwInput) return;

        var pwLi = pwInput.closest('li');
        if (!pwLi) return;

        pwLi.style.position = 'relative';

        var toggleBtn = document.createElement('button');
        toggleBtn.type = 'button';
        toggleBtn.className = 'password-toggle';
        toggleBtn.setAttribute('aria-label', '비밀번호 표시');
        toggleBtn.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">' +
            '<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>' +
            '<circle cx="12" cy="12" r="3"></circle>' +
            '</svg>';

        toggleBtn.addEventListener('click', function() {
            var isPassword = pwInput.type === 'password';
            pwInput.type = isPassword ? 'text' : 'password';
            this.setAttribute('aria-label', isPasswor
initLoginToggle function · javascript · L4-L80 (77 LOC)
1초 로그인(킵그로우)/회원 로그인/js.js
    function initLoginToggle() {
        if (typeof jQuery === 'undefined') {
            setTimeout(initLoginToggle, 100);
            return;
        }

        jQuery(document).ready(function($){
            // 토글 기능 - #simpleLogin 안의 .mlog-sign를 보여주기
            $("#toggleTraditionalLogin").on("click", function(e){
                e.preventDefault();
                $(this).toggleClass("active");
                $("#simpleLogin .mlog-sign").toggleClass("show-traditional");

                var isExpanded = $("#simpleLogin .mlog-sign").hasClass("show-traditional");
                $(this).attr("aria-expanded", isExpanded ? "true" : "false");

                // 토글이 열릴 때 첫 번째 입력 필드에 포커스
                if (isExpanded) {
                    setTimeout(function() {
                        $("#simpleLogin .mlog-sign input:first").focus();
                    }, 300);
                }
                return false;
            });

            // 엔터키 로그인 기능
            $("#simpleLogin .m
initAutocomplete function · javascript · L83-L94 (12 LOC)
1초 로그인(킵그로우)/회원 로그인/js.js
    function initAutocomplete() {
        var idInput = document.querySelector('#loginWrap input[name="id"]');
        var pwInput = document.querySelector('#loginWrap input[name="passwd"]');
        if (idInput) idInput.setAttribute('autocomplete', 'email');
        if (pwInput) pwInput.setAttribute('autocomplete', 'current-password');

        // 주문조회 비회원 폼
        var nameInput = document.querySelector('#loginWrap input[name="order_name"]');
        var orderInput = document.querySelector('#loginWrap input[name="order_id"]');
        if (nameInput) nameInput.setAttribute('autocomplete', 'name');
        if (orderInput) orderInput.setAttribute('autocomplete', 'off');
    }
initPasswordToggle function · javascript · L97-L123 (27 LOC)
1초 로그인(킵그로우)/회원 로그인/js.js
    function initPasswordToggle() {
        var pwInput = document.querySelector('#loginWrap input[name="passwd"]');
        if (!pwInput) return;

        var pwLi = pwInput.closest('li');
        if (!pwLi) return;

        pwLi.style.position = 'relative';

        var toggleBtn = document.createElement('button');
        toggleBtn.type = 'button';
        toggleBtn.className = 'password-toggle';
        toggleBtn.setAttribute('aria-label', '비밀번호 표시');
        toggleBtn.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">' +
            '<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>' +
            '<circle cx="12" cy="12" r="3"></circle>' +
            '</svg>';

        toggleBtn.addEventListener('click', function() {
            var isPassword = pwInput.type === 'password';
            pwInput.type = isPassword ? 'text' : 'password';
            this.setAttribute('aria-label', isPasswor
initLoginToggle function · javascript · L4-L80 (77 LOC)
1초 로그인(킵그로우)/주문 조회 로그인/js.js
    function initLoginToggle() {
        if (typeof jQuery === 'undefined') {
            setTimeout(initLoginToggle, 100);
            return;
        }

        jQuery(document).ready(function($){
            // 토글 기능 - #simpleLogin 안의 .mlog-sign를 보여주기
            $("#toggleTraditionalLogin").on("click", function(e){
                e.preventDefault();
                $(this).toggleClass("active");
                $("#simpleLogin .mlog-sign").toggleClass("show-traditional");

                var isExpanded = $("#simpleLogin .mlog-sign").hasClass("show-traditional");
                $(this).attr("aria-expanded", isExpanded ? "true" : "false");

                // 토글이 열릴 때 첫 번째 입력 필드에 포커스
                if (isExpanded) {
                    setTimeout(function() {
                        $("#simpleLogin .mlog-sign input:first").focus();
                    }, 300);
                }
                return false;
            });

            // 엔터키 로그인 기능
            $("#simpleLogin .m
Open data scored by Repobility · https://repobility.com
initAutocomplete function · javascript · L83-L94 (12 LOC)
1초 로그인(킵그로우)/주문 조회 로그인/js.js
    function initAutocomplete() {
        var idInput = document.querySelector('#loginWrap input[name="id"]');
        var pwInput = document.querySelector('#loginWrap input[name="passwd"]');
        if (idInput) idInput.setAttribute('autocomplete', 'email');
        if (pwInput) pwInput.setAttribute('autocomplete', 'current-password');

        // 주문조회 비회원 폼
        var nameInput = document.querySelector('#loginWrap input[name="order_name"]');
        var orderInput = document.querySelector('#loginWrap input[name="order_id"]');
        if (nameInput) nameInput.setAttribute('autocomplete', 'name');
        if (orderInput) orderInput.setAttribute('autocomplete', 'off');
    }
initPasswordToggle function · javascript · L97-L123 (27 LOC)
1초 로그인(킵그로우)/주문 조회 로그인/js.js
    function initPasswordToggle() {
        var pwInput = document.querySelector('#loginWrap input[name="passwd"]');
        if (!pwInput) return;

        var pwLi = pwInput.closest('li');
        if (!pwLi) return;

        pwLi.style.position = 'relative';

        var toggleBtn = document.createElement('button');
        toggleBtn.type = 'button';
        toggleBtn.className = 'password-toggle';
        toggleBtn.setAttribute('aria-label', '비밀번호 표시');
        toggleBtn.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">' +
            '<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>' +
            '<circle cx="12" cy="12" r="3"></circle>' +
            '</svg>';

        toggleBtn.addEventListener('click', function() {
            var isPassword = pwInput.type === 'password';
            pwInput.type = isPassword ? 'text' : 'password';
            this.setAttribute('aria-label', isPasswor
debounce function · javascript · L19-L29 (11 LOC)
브랜드스토리/브랜드페이지/js/common.js
    function debounce(func, wait) {
        var timeout;
        return function() {
            var context = this;
            var args = arguments;
            clearTimeout(timeout);
            timeout = setTimeout(function() {
                func.apply(context, args);
            }, wait);
        };
    }
throttle function · javascript · L37-L50 (14 LOC)
브랜드스토리/브랜드페이지/js/common.js
    function throttle(func, limit) {
        var inThrottle;
        return function() {
            var args = arguments;
            var context = this;
            if (!inThrottle) {
                func.apply(context, args);
                inThrottle = true;
                setTimeout(function() {
                    inThrottle = false;
                }, limit);
            }
        };
    }
adjustPadding function · javascript · L118-L121 (4 LOC)
브랜드스토리/브랜드페이지/js/common.js
            function adjustPadding() {
                var paddingTop = (jQuery(window).width() >= 768) ? '0' : '104px';
                jqContainer.css('padding-top', paddingTop);
            }
updateSlideCount function · javascript · L61-L69 (9 LOC)
간편 구매/js.fixed.js
    function updateSlideCount() {
        var swiperNumElement = document.querySelector('.mo-ver .goods-imgs--thumbs .swiper-num');
        if (swiperNumElement) {
            swiperNumElement.querySelector('strong').textContent = goodsSwiper.activeIndex + 1; // 현재 슬라이드 번호
            swiperNumElement.querySelector('span').textContent = thumbsImages.length; // 다중 이미지 수
        } else {
            console.warn('swiper-num');
        }
    }
updateNavigationButtons function · javascript · L102-L117 (16 LOC)
간편 구매/js.fixed.js
    function updateNavigationButtons(swiper) {
        var prevButton = document.querySelector('.relation-btn .prev');
        var nextButton = document.querySelector('.relation-btn .next');

        if (swiper.isBeginning) {
            prevButton.classList.add('disable');
        } else {
            prevButton.classList.remove('disable');
        }

        if (swiper.isEnd) {
            nextButton.classList.add('disable');
        } else {
            nextButton.classList.remove('disable');
        }
    }
fallbackCopyToClipboard function · javascript · L217-L233 (17 LOC)
간편 구매/js.fixed.js
    function fallbackCopyToClipboard(text) {
        var textarea = document.createElement("textarea");
        textarea.value = text;
        textarea.style.position = "fixed";
        textarea.style.top = "-9999px";
        document.body.appendChild(textarea);
        textarea.select();

        try {
            document.execCommand("copy");
            alert("URL이 복사되었습니다.");
        } catch (err) {
            alert("복사에 실패했습니다.");
        }

        document.body.removeChild(textarea);
    }
Repobility · open methodology · https://repobility.com/research/
checkInfosGroups function · javascript · L245-L250 (6 LOC)
간편 구매/js.fixed.js
    function checkInfosGroups() {
        document.querySelectorAll('.infos--group').forEach(function(el) {
            var content = el.innerHTML.trim();
            el.style.display = content === '' ? 'none' : '';
        });
    }
initPinchZoom function · javascript · L270-L364 (95 LOC)
간편 구매/js.fixed.js
    function initPinchZoom() {
        var container = document.querySelector('.mo-ver .goods-imgs--thumbs');
        if (!container || !('ontouchstart' in window)) return;

        var state = { scale: 1, lastDist: 0, translateX: 0, translateY: 0, startX: 0, startY: 0, lastTap: 0 };

        function getActiveImg() {
            var activeSlide = container.querySelector('.cowave-swiper-slide[class*="active"] img');
            return activeSlide || container.querySelector('.cowave-swiper-slide img');
        }

        function applyTransform(img) {
            if (!img) return;
            var tx = state.translateX / state.scale;
            var ty = state.translateY / state.scale;
            img.style.transform = 'scale(' + state.scale + ') translate(' + tx + 'px, ' + ty + 'px)';
            img.style.transformOrigin = 'center center';
        }

        function resetZoom(img) {
            state.scale = 1;
            state.translateX = 0;
            state.translateY = 0;
      
getActiveImg function · javascript · L276-L279 (4 LOC)
간편 구매/js.fixed.js
        function getActiveImg() {
            var activeSlide = container.querySelector('.cowave-swiper-slide[class*="active"] img');
            return activeSlide || container.querySelector('.cowave-swiper-slide img');
        }
applyTransform function · javascript · L281-L287 (7 LOC)
간편 구매/js.fixed.js
        function applyTransform(img) {
            if (!img) return;
            var tx = state.translateX / state.scale;
            var ty = state.translateY / state.scale;
            img.style.transform = 'scale(' + state.scale + ') translate(' + tx + 'px, ' + ty + 'px)';
            img.style.transformOrigin = 'center center';
        }
resetZoom function · javascript · L289-L298 (10 LOC)
간편 구매/js.fixed.js
        function resetZoom(img) {
            state.scale = 1;
            state.translateX = 0;
            state.translateY = 0;
            if (img) {
                img.style.transform = '';
                img.style.transformOrigin = '';
            }
            container.classList.remove('is-zoomed');
        }
initRecentProducts function · javascript · L372-L403 (32 LOC)
간편 구매/js.fixed.js
    function initRecentProducts() {
        var titleEl = document.querySelector('#productDetail .goods--title');
        var imgEl = document.querySelector('#productDetail .goods-imgs--view img');
        var priceEl = document.querySelector('#productDetail .goods--price-wrap .price strong');
        if (!titleEl) return;

        var current = {
            name: titleEl.textContent.trim(),
            image: imgEl ? imgEl.getAttribute('src') : '',
            price: priceEl ? priceEl.textContent.trim() : '',
            url: location.pathname + location.search
        };

        var products = [];
        try {
            var stored = localStorage.getItem(RECENT_KEY);
            if (stored) products = JSON.parse(stored);
        } catch (e) { /* localStorage 접근 불가 시 무시 */ }

        // 중복 제거 후 앞에 추가
        products = products.filter(function(p) { return p.url !== current.url; });
        products.unshift(current);
        if (products.length > RECENT_MAX) products = products.sli
renderRecentWidget function · javascript · L405-L423 (19 LOC)
간편 구매/js.fixed.js
    function renderRecentWidget(products) {
        var container = document.getElementById('recentProductsWrap');
        if (!container || products.length === 0) return;

        var html = '';
        for (var i = 0; i < products.length; i++) {
            var p = products[i];
            html +=
                '<a href="' + escapeAttr(p.url) + '" class="recent-item">' +
                    '<div class="recent-img">' +
                        '<img src="' + escapeAttr(p.image) + '" alt="' + escapeAttr(p.name) + '" loading="lazy">' +
                    '</div>' +
                    '<p class="recent-name">' + escapeHTML(p.name) + '</p>' +
                    '<span class="recent-price">' + escapeHTML(p.price) + '원</span>' +
                '</a>';
        }
        container.innerHTML = html;
        container.closest('.recent-products').style.display = 'block';
    }
initReviewAnchor function · javascript · L428-L456 (29 LOC)
간편 구매/js.fixed.js
    function initReviewAnchor() {
        // 탭 영역에서 리뷰 수 읽기
        var reviewTab = document.querySelector('.tab-navi--links li:nth-child(2) a em');
        var reviewCount = reviewTab ? reviewTab.textContent.replace(/[()]/g, '').trim() : '0';

        var anchor = document.getElementById('reviewAnchorBtn');
        if (!anchor) return;

        var countSpan = anchor.querySelector('.review-count');
        if (countSpan) countSpan.textContent = reviewCount;

        if (reviewCount === '0') {
            anchor.style.display = 'none';
            return;
        }

        anchor.addEventListener('click', function(e) {
            e.preventDefault();
            var content2 = document.getElementById('content2');
            if (content2) {
                // 탭 활성화
                var tabLinks = document.querySelectorAll('.tab-navi--links li');
                tabLinks.forEach(function(li) { li.classList.remove('active'); });
                if (tabLinks[1]) tabLinks[1].classList.add(
Repobility · code-quality intelligence · https://repobility.com
initViewBadge function · javascript · L461-L468 (8 LOC)
간편 구매/js.fixed.js
    function initViewBadge() {
        var badge = document.getElementById('viewCountBadge');
        if (!badge) return;

        var count = Math.floor(Math.random() * 31) + 15; // 15~45
        badge.querySelector('.badge-count').textContent = count;
        badge.style.display = 'inline-flex';
    }
initOGMeta function · javascript · L473-L539 (67 LOC)
간편 구매/js.fixed.js
    function initOGMeta() {
        var titleEl = document.querySelector('#productDetail .goods--title');
        var imgEl = document.querySelector('#productDetail .goods-imgs--view img');
        var priceEl = document.querySelector('#productDetail .goods--price-wrap .price strong');
        if (!titleEl) return;

        var ogTags = [
            { property: 'og:title', content: titleEl.textContent.trim() + ' | PRESSCO21' },
            { property: 'og:type', content: 'product' },
            { property: 'og:url', content: location.href },
            { property: 'og:image', content: imgEl ? imgEl.getAttribute('src') : '' },
            { property: 'og:description', content: titleEl.textContent.trim() + ' - PRESSCO21 압화/보존화 전문' }
        ];

        if (priceEl) {
            ogTags.push({ property: 'product:price:amount', content: priceEl.textContent.replace(/[^0-9]/g, '') });
            ogTags.push({ property: 'product:price:currency', content: 'KRW' });
        }

        for (
escapeHTML function · javascript · L544-L549 (6 LOC)
간편 구매/js.fixed.js
    function escapeHTML(str) {
        if (!str) return '';
        var div = document.createElement('div');
        div.appendChild(document.createTextNode(str));
        return div.innerHTML;
    }
escapeAttr function · javascript · L551-L554 (4 LOC)
간편 구매/js.fixed.js
    function escapeAttr(str) {
        if (!str) return '';
        return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
    }
debounce function · javascript · L21-L31 (11 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
    function debounce(func, wait) {
        var timeout;
        return function() {
            var context = this;
            var args = arguments;
            clearTimeout(timeout);
            timeout = setTimeout(function() {
                func.apply(context, args);
            }, wait);
        };
    }
isInViewport function · javascript · L38-L41 (4 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
    function isInViewport(el) {
        var rect = el.getBoundingClientRect();
        return rect.top < window.innerHeight && rect.bottom > 0;
    }
initScrollProgress function · javascript · L51-L65 (15 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initScrollProgress() {
            var progressBar = document.querySelector('.scroll-progress');
            if (!progressBar) return;

            function updateProgress() {
                var scrollTop = window.scrollY;
                var docHeight = document.documentElement.scrollHeight - window.innerHeight;
                var progress = docHeight > 0 ? (scrollTop / docHeight) * 100 : 0;
                /* 메이크샵 이스케이프 주의: 템플릿 리터럴 미사용 */
                progressBar.style.width = progress + '%';
            }

            window.addEventListener('scroll', updateProgress, { passive: true });
            updateProgress();
        }
updateProgress function · javascript · L55-L61 (7 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function updateProgress() {
                var scrollTop = window.scrollY;
                var docHeight = document.documentElement.scrollHeight - window.innerHeight;
                var progress = docHeight > 0 ? (scrollTop / docHeight) * 100 : 0;
                /* 메이크샵 이스케이프 주의: 템플릿 리터럴 미사용 */
                progressBar.style.width = progress + '%';
            }
Methodology: Repobility · https://repobility.com/research/state-of-ai-code-2026/
initSectionNav function · javascript · L72-L116 (45 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initSectionNav() {
            var sections = document.querySelectorAll('section[id]');
            var desktopNavLinks = document.querySelectorAll('.section-nav a');
            var sectionNav = document.querySelector('.section-nav');
            var heroSection = document.querySelector('.hero-section');

            if (!sections.length) return;

            /* 현재 섹션 감지 */
            var sectionObserver = new IntersectionObserver(function(entries) {
                entries.forEach(function(entry) {
                    if (entry.isIntersecting) {
                        var sectionId = entry.target.id;

                        /* 데스크톱 네비게이션 */
                        desktopNavLinks.forEach(function(link) {
                            link.classList.remove('active');
                        });
                        var activeLink = document.querySelector('.section-nav a[data-section="' + sectionId + '"]');
                        if (activeLink) {
                
initAchievementTabs function · javascript · L123-L150 (28 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initAchievementTabs() {
            var tabBtns = document.querySelectorAll('.tab-btn');
            var tabContents = document.querySelectorAll('.tab-content');

            if (!tabBtns.length) return;

            tabBtns.forEach(function(btn) {
                btn.addEventListener('click', function() {
                    var tabId = this.getAttribute('data-tab');

                    tabBtns.forEach(function(b) {
                        b.classList.remove('active');
                        b.setAttribute('aria-selected', 'false');
                    });
                    this.classList.add('active');
                    this.setAttribute('aria-selected', 'true');

                    tabContents.forEach(function(content) {
                        content.classList.remove('active');
                    });

                    var selectedContent = document.querySelector('.tab-content[data-tab-id="' + tabId + '"]');
                    if (selectedContent) {
   
animateCount function · javascript · L157-L177 (21 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function animateCount(element, target, duration) {
            duration = duration || 2000;
            var startTime = performance.now();

            function animate(currentTime) {
                var elapsed = currentTime - startTime;
                var progress = Math.min(elapsed / duration, 1);
                /* easeOutCubic */
                var easedProgress = 1 - Math.pow(1 - progress, 3);
                var current = Math.floor(target * easedProgress);
                element.textContent = current + '+';

                if (progress < 1) {
                    requestAnimationFrame(animate);
                } else {
                    element.textContent = target + '+';
                }
            }

            requestAnimationFrame(animate);
        }
animate function · javascript · L161-L174 (14 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function animate(currentTime) {
                var elapsed = currentTime - startTime;
                var progress = Math.min(elapsed / duration, 1);
                /* easeOutCubic */
                var easedProgress = 1 - Math.pow(1 - progress, 3);
                var current = Math.floor(target * easedProgress);
                element.textContent = current + '+';

                if (progress < 1) {
                    requestAnimationFrame(animate);
                } else {
                    element.textContent = target + '+';
                }
            }
initStatsCounter function · javascript · L179-L202 (24 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initStatsCounter() {
            var statsSection = document.querySelector('.stats-counter');
            if (!statsSection) return;

            var statsObserver = new IntersectionObserver(function(entries) {
                entries.forEach(function(entry) {
                    if (entry.isIntersecting) {
                        var statNumbers = document.querySelectorAll('.stat-number');
                        statNumbers.forEach(function(stat) {
                            if (!stat.hasAttribute('data-animated')) {
                                var value = parseInt(stat.getAttribute('data-value'), 10);
                                if (!isNaN(value)) {
                                    animateCount(stat, value);
                                    stat.setAttribute('data-animated', 'true');
                                }
                            }
                        });
                        statsObserver.unobserve(entry.target);
               
initBookCarousel function · javascript · L209-L238 (30 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initBookCarousel() {
            if (typeof jQuery === 'undefined' || typeof jQuery.fn.slick === 'undefined') return;

            jQuery('.book-carousel').slick({
                slidesToShow: 4,
                slidesToScroll: 1,
                infinite: true,
                dots: true,
                arrows: true,
                autoplay: false,
                responsive: [
                    {
                        breakpoint: 1200,
                        settings: { slidesToShow: 3, slidesToScroll: 1 }
                    },
                    {
                        breakpoint: 992,
                        settings: { slidesToShow: 2.5, slidesToScroll: 1 }
                    },
                    {
                        breakpoint: 768,
                        settings: { slidesToShow: 2, slidesToScroll: 1 }
                    },
                    {
                        breakpoint: 640,
                        settings: { slidesToShow: 1.2, 
initGalleryLightbox function · javascript · L245-L393 (149 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initGalleryLightbox() {
            var galleryItems = document.querySelectorAll('.gallery-item');
            var lightboxEl = document.querySelector('.heritage-lightbox');

            if (!galleryItems.length || !lightboxEl) return;

            var swiperInstance = null;
            var closeBtn = lightboxEl.querySelector('.lightbox-close-btn');
            var previousFocus = null;

            /* Swiper 인스턴스 생성 */
            function createSwiper() {
                if (typeof Swiper === 'undefined') return null;

                return new Swiper('.heritage-lightbox .swiper', {
                    loop: false,
                    keyboard: {
                        enabled: true,
                        onlyInViewport: false
                    },
                    navigation: {
                        nextEl: '.heritage-lightbox .swiper-button-next',
                        prevEl: '.heritage-lightbox .swiper-button-prev'
                    },
             
createSwiper function · javascript · L256-L277 (22 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function createSwiper() {
                if (typeof Swiper === 'undefined') return null;

                return new Swiper('.heritage-lightbox .swiper', {
                    loop: false,
                    keyboard: {
                        enabled: true,
                        onlyInViewport: false
                    },
                    navigation: {
                        nextEl: '.heritage-lightbox .swiper-button-next',
                        prevEl: '.heritage-lightbox .swiper-button-prev'
                    },
                    pagination: {
                        el: '.heritage-lightbox .swiper-pagination',
                        clickable: true
                    },
                    zoom: {
                        maxRatio: 3
                    }
                });
            }
Open data scored by Repobility · https://repobility.com
openLightbox function · javascript · L280-L336 (57 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function openLightbox(index) {
                /* 현재 보이는 갤러리 아이템으로 슬라이드 생성 */
                var visibleItems = [];
                galleryItems.forEach(function(item) {
                    if (!item.classList.contains('hidden')) {
                        visibleItems.push(item);
                    }
                });

                /* 슬라이드 Wrapper 업데이트 */
                var swiperWrapper = lightboxEl.querySelector('.swiper-wrapper');
                if (!swiperWrapper) return;

                swiperWrapper.innerHTML = '';

                visibleItems.forEach(function(item) {
                    var img = item.querySelector('img');
                    if (img) {
                        var slide = document.createElement('div');
                        slide.className = 'swiper-slide';
                        var slideImg = document.createElement('img');
                        slideImg.src = img.src;
                        slideImg.alt = img.alt;
                 
closeLightbox function · javascript · L339-L349 (11 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function closeLightbox() {
                lightboxEl.classList.remove('active');
                document.body.style.overflow = '';
                if (swiperInstance) {
                    swiperInstance.destroy(true, true);
                    swiperInstance = null;
                }
                if (previousFocus) {
                    previousFocus.focus();
                }
            }
initGalleryFilter function · javascript · L400-L429 (30 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initGalleryFilter() {
            var filterBtns = document.querySelectorAll('.filter-btn');
            var galleryItems = document.querySelectorAll('.gallery-item[data-category]');

            if (!filterBtns.length || !galleryItems.length) return;

            filterBtns.forEach(function(btn) {
                btn.addEventListener('click', function() {
                    var category = this.getAttribute('data-category');

                    filterBtns.forEach(function(b) {
                        b.classList.remove('active');
                        b.setAttribute('aria-selected', 'false');
                    });
                    this.classList.add('active');
                    this.setAttribute('aria-selected', 'true');

                    galleryItems.forEach(function(item) {
                        var itemCategory = item.getAttribute('data-category');
                        if (category === 'all' || itemCategory === category) {
                        
initSmoothScroll function · javascript · L436-L453 (18 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initSmoothScroll() {
            var anchorLinks = document.querySelectorAll('a[href^="#"]');
            anchorLinks.forEach(function(link) {
                link.addEventListener('click', function(e) {
                    var href = this.getAttribute('href');
                    if (href !== '#') {
                        e.preventDefault();
                        var target = document.querySelector(href);
                        if (target) {
                            window.scrollTo({
                                top: target.offsetTop,
                                behavior: 'smooth'
                            });
                        }
                    }
                });
            });
        }
initMobileDrawer function · javascript · L460-L523 (64 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initMobileDrawer() {
            var hamburgerBtn = document.querySelector('.hamburger-btn');
            var drawer = document.querySelector('.mobile-drawer');
            var drawerClose = document.querySelector('.drawer-close');
            var drawerOverlay = document.querySelector('.drawer-overlay');
            var drawerLinks = document.querySelectorAll('.drawer-nav a');

            if (!hamburgerBtn || !drawer) return;

            function openDrawer() {
                drawer.classList.add('active');
                drawerOverlay.classList.add('active');
                hamburgerBtn.classList.add('active');
                hamburgerBtn.setAttribute('aria-expanded', 'true');
                document.body.style.overflow = 'hidden';
                if (drawerClose) drawerClose.focus();
            }

            function closeDrawer() {
                drawer.classList.remove('active');
                drawerOverlay.classList.remove('active');
                h
openDrawer function · javascript · L469-L476 (8 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function openDrawer() {
                drawer.classList.add('active');
                drawerOverlay.classList.add('active');
                hamburgerBtn.classList.add('active');
                hamburgerBtn.setAttribute('aria-expanded', 'true');
                document.body.style.overflow = 'hidden';
                if (drawerClose) drawerClose.focus();
            }
closeDrawer function · javascript · L478-L485 (8 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function closeDrawer() {
                drawer.classList.remove('active');
                drawerOverlay.classList.remove('active');
                hamburgerBtn.classList.remove('active');
                hamburgerBtn.setAttribute('aria-expanded', 'false');
                document.body.style.overflow = '';
                hamburgerBtn.focus();
            }
initTimelineModal function · javascript · L530-L637 (108 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initTimelineModal() {
            var timelineItems = document.querySelectorAll('.timeline-item');
            var modal = document.getElementById('timelineModal');

            if (!modal || !timelineItems.length) return;

            var modalClose = modal.querySelector('.modal-close');
            var modalYear = document.getElementById('modalYear');
            var modalTitle = document.getElementById('modalTitle');
            var modalDescription = document.getElementById('modalDescription');
            var previousFocus = null;

            /* 타임라인 상세 데이터 */
            var timelineData = {
                '1985': {
                    title: '\uC138\uACC4\uD50C\uB77C\uC6CC \uC62C\uB9BC\uD53D \uB3D9\uC0C1 \uC218\uC0C1',
                    description: '\uC555\uD654 \uACF5\uC608\uC758 \uAD6D\uC81C\uC801 \uC778\uC815\uC744 \uBC1B\uC740 \uCCAB \uD574. \uC774 \uC21C\uAC04\uBD80\uD130 "\uC5B4\uB5BB\uAC8C \uD558\uBA74 \uC774 \uC544\uB984\uB2E4\uC6C0\uC744 \uC601\uC6
Repobility · open methodology · https://repobility.com/research/
openModal function · javascript · L590-L602 (13 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function openModal(year) {
                var data = timelineData[year];
                if (!data) return;

                if (modalYear) modalYear.textContent = year;
                if (modalTitle) modalTitle.textContent = data.title;
                if (modalDescription) modalDescription.textContent = data.description;

                modal.classList.add('active');
                document.body.style.overflow = 'hidden';
                previousFocus = document.activeElement;
                if (modalClose) modalClose.focus();
            }
closeModal function · javascript · L604-L608 (5 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
            function closeModal() {
                modal.classList.remove('active');
                document.body.style.overflow = '';
                if (previousFocus) previousFocus.focus();
            }
initScrollAnimations function · javascript · L644-L709 (66 LOC)
브랜드스토리/브랜드페이지/js/heritage.js
        function initScrollAnimations() {
            var scrollRevealObserver = new IntersectionObserver(function(entries) {
                entries.forEach(function(entry) {
                    if (entry.isIntersecting) {
                        entry.target.classList.add('scroll-revealed');
                        scrollRevealObserver.unobserve(entry.target);
                    }
                });
            }, { threshold: 0.1, rootMargin: '50px 0px 0px 0px' });

            /* 섹션 타이틀 */
            document.querySelectorAll('#heritage-main .section-title').forEach(function(el) {
                if (isInViewport(el)) {
                    el.classList.add('scroll-revealed');
                } else {
                    el.classList.add('animate-on-scroll');
                    scrollRevealObserver.observe(el);
                }
            });

            /* 카드들 */
            document.querySelectorAll('#heritage-main .value-card, #heritage-main .education-card, #heritage-main
page 1 / 7next ›