/* ---------- js ---------- */ jQuery(function ($) { /* ¸ð¹ÙÀÏ ¸Þ´º ¿­±â */ function mNav_open() { $(".btn-nav").addClass("mNav_open"); $("#header .navWrap").addClass("mNav_open"); $(".gnbMenuBg").fadeIn(); } function mNav_close() { $(".btn-nav").removeClass("mNav_open"); $("#header .navWrap").removeClass("mNav_open"); $(".gnbMenuBg").fadeOut(); } $(".btn-nav").click(function () { if (!$(this).hasClass("mNav_open")) { mNav_open(); } else { mNav_close(); } }); $(".gnbMenuBg,.mobile-header-close,.navWrap .gnb > li > a,.header-go-to-top").click(function () { mNav_close(); }); $(window).resize(function () { if ($(window).width() > 991) { mNav_close(); }; }); $(window).scroll(function () { if ($(this).scrollTop() > 150) $('.go-to-top').fadeIn('slow'); else $('.go-to-top').fadeOut('slow'); }); $('.header-go-to-top').click(function () { $("html, body").animate({ scrollTop: 0 }, 500); return false; }); $('.go-to-top').click(function () { $("html, body").animate({ scrollTop: 0 }, 500); return false; }); $(window).load(function () { function replaceText(selector, searchValue, replaceValue) { $(selector).each(function() { var content = $(this).html(); content = content.replace(searchValue, replaceValue); $(this).html(content); }); } // Call the replaceText function to replace the specific text replaceText('td.formmail_cell_bgcolor', '°³ÀÎÁ¤º¸ÀÇ ¼öÁý ¹× ÀÌ¿ë¸ñÀû', 'Personal information agreement'); replaceText('td.formmail_cell_bgcolor', '°³ÀÎÁ¤º¸ÀÇ ¼öÁý ¹× ÀÌ¿ë¸ñÀû¿¡ µ¿ÀÇÇÕ´Ï´Ù.', 'I accept on collection and usage of my personal information'); console.log("window on load"); }); });