// Bootstrap affix - 메뉴바 그림자 $('#mainNavbar').affix({ offset: { top: 40 } }); // jQuery 실행 jQuery(function ($) { 'use strict'; // 스크롤 시 상단 바 숨김/노출 $(window).on('scroll', function () { if ($(this).scrollTop() === 0) { $('.v-topbar-w').stop(true, false).slideDown(); } else { $('.v-topbar-w').stop(true, false).slideUp('fast'); } }); // 앵커 스크롤 이동 $('li a[href*=\\#]').on('click', function (e) { var anchor = $(this.getAttribute('href')); if (anchor.length) { $('html, body').stop().animate({ scrollTop: anchor.offset().top - 136 }, 600); e.preventDefault(); } }); // 탑버튼 표시 제어 $(window).on('scroll', function () { if ($(this).scrollTop() > 100) { $('.scroll-up').fadeIn(); } else { $('.scroll-up').fadeOut(); } }); // 패럴럭스 초기화 $(window).on('load', function () { if (typeof parallaxInit === 'function') { parallaxInit(); } }); // 햄버거 토글 버튼 $('.navbar-toggle').on('click', function () { $(this).toggleClass('active'); }); // ScrollReveal 적용 (조건 확인) if (typeof ScrollReveal !== 'undefined') { window.sr = ScrollReveal(); sr.reveal('.p-1', { duration: 1200, scale: 1, opacity: 0, origin: 'bottom', distance: '43px' }); } });