// 메뉴바에 그림자 추가 및 Affix 설정 $('#mainNavbar').affix({ offset: { top: 40 } }); // jQuery 시작 jQuery(function ($) { 'use strict'; // 스크롤 애니메이션 $('li a[href*=#]').on("click", function (e) { e.preventDefault(); // 기본 동작 방지 var anchor = $(this).attr('href'); var targetElement = $(anchor); // 요소가 존재하는지 확인 if (targetElement.length) { $('html, body').animate({ scrollTop: targetElement.offset().top - 136 }, 700); } else { console.error('Target element not found:', anchor); } }); // 탑 가기 버튼 표시/숨김 $(window).on('scroll', function () { if ($(this).scrollTop() > 100) { $('.scroll-up').fadeIn(); } else { $('.scroll-up').fadeOut(); } }); // AOS 애니메이션 초기화 AOS.init({ duration: 800, delay: 15 }); // 이미지 src 변경 $("img").each(function () { var currentSrc = $(this).attr("src"); switch (currentSrc) { case "/cimg/arr_page_go.gif": $(this).attr("src", "../img/vdata/inc/images/par1.png"); break; case "/cimg/arr_page_next.gif": $(this).attr("src", "../img/vdata/inc/images/par2.png"); break; case "/cimg/arr_page_back.gif": $(this).attr("src", "../img/vdata/inc/images/pal1.png"); break; case "/cimg/arr_page_pre.gif": $(this).attr("src", "../img/vdata/inc/images/pal2.png"); break; } }); // 텍스트 페이드인 효과 $(".mstx-inw").hide().fadeIn(1000); }); // 토글 버튼 활성화 상태 설정 $(document).ready(function () { $(".navbar-toggle").on("click", function () { $(this).toggleClass("active"); }); });