$(document).ready(function () { // 모바일 메뉴 실행 $(".menu").click(function () { $("#m_menu").toggleClass("show"); if ($("#m_menu").hasClass("show")) { $('html, body').css({ 'overflow': 'hidden' }); $(this).css({ 'overflow-y': 'auto' }); $('html, body').on('scroll touchmove mousewheel', function (event) { event.preventDefault(); event.stopPropagation(); return false; }); } else { $('html, body').css({ 'overflow': 'auto' }); $(this).off('scroll touchmove mousewheel'); } }); // 모바일 메뉴 아코디언 메뉴 $("#m_menu > ul > li").click(function () { $(this).find(".subnav").stop().slideToggle(300); // $(this).find(".subnav").css("overflow", "scroll"); $(this).toggleClass('active').siblings().removeClass('active'); $(this).siblings().find(".subnav").stop().slideUp(300); }); // 모바일 메인 푸터 메뉴 슬라이드 토글 $('.m_footer_nav .f_title').click(function () { $(this).toggleClass('active').next('.sub_nav').slideToggle(); if ($(this).hasClass('active')) { $(this).find('.xi-angle-right-thin').removeClass().addClass('xi-angle-down-thin'); } else { $(this).find('.xi-angle-down-thin').removeClass().addClass('xi-angle-right-thin'); } }); // 서브 메뉴 슬라이드 토글2 $('.sub_info .sub_info_tit').click(function () { $(this).toggleClass('active').next('.sub_box2').slideToggle(); if ($(this).hasClass('active')) { $(this).find('.xi-angle-right-thin').removeClass().addClass('xi-angle-down-thin'); } else { $(this).find('.xi-angle-down-thin').removeClass().addClass('xi-angle-right-thin'); } }); // CAD 다운로드 폼메일 모달창 $(".cad_box").click(function(){ $(".cad_form").css("display", "block"); $('html, body').css({ 'overflow': 'hidden' }); $(this).css({ 'overflow-y': 'auto' }); $('html, body').on('scroll touchmove mousewheel', function (event) { event.preventDefault(); event.stopPropagation(); return false; }); }); $(".cad_form .close_icon").click(function(e){ e.preventDefault(); $(".cad_form").css("display", "none"); $('html, body').css({ 'overflow': 'auto' }); $(this).off('scroll touchmove mousewheel'); }); }); function setPage(arg) { //navigation hn:1depth, sn:2depth, cn:3depth 를 받음 page = jQuery.extend({ hn: "", sn: "", cn: "" }, arg || {}); if (window.console) { console.log("hn : " + page.hn + "\nsn : " + page.sn + "\ncn : " + page.cn); } if (page.hn != 10) { $("#gnb ul > li.hn" + page.hn + " a").addClass("on"); //1depth 활성 } if (page.hn >= 11) { $("#gnb ul > li.hn" + page.hn + " a").addClass("on"); //유틸 1depth 활성 } $(".snb ul li.sn" + page.sn).find(" a").addClass("on").end().find("> ul").addClass("on").find("> li.cn" + page.cn + " a").addClass("on"); //2depth 활성 }