// ### moblie_hammenu.js ### // È­¸éÀÇ Å©±â°¡ ¸ð¹ÙÀÏÀÏ ¶§, ¸Þ´ºÀÇ µ¿ÀÛÀ» °ü¸®ÇÕ´Ï´Ù. // -------- PC¸ðµå üŷ -------- function isPCMode() { if (window.innerWidth > 1199) return true; return false; }; // -------- PC¸ðµå üŷ -------- // -------- (Mobile hammenu) -------- // ¸Þ´º Ŭ¸¯ ½Ã ¼¼ºÎ¸Þ´º¿¡ ´ëÇÑ ¾Ö´Ï¸ÞÀ̼ÇÀ» °ü¸®ÇÕ´Ï´Ù. jQuery(document).ready(function($) { $(".hammenu > ul > li").on("mouseenter focusin", function() { if (isPCMode()) { $(this).addClass("active"); if ($(".hamsub", this).length > 0) { $(".h_wrap").stop().animate({paddingBottom:$(".hamsub",this).height()},300,"easeOutCubic"); }; } }); $(".hammenu > ul > li").on("mouseleave focusout", function() { if (isPCMode()) { $(this).removeClass("active"); $(".h_wrap").stop().animate({paddingBottom:0},300,'easeOutCubic'); }; }); $(".hammenu a").on("click", function() { if (!isPCMode()) { if ($(this).siblings("ul").length > 0) { $(this).closest("li").toggleClass("active").siblings("li").removeClass("active").find("ul").stop().slideUp('fast'); $(this).siblings("ul").stop().slideToggle('fast'); return false; } } }); }); // -------- (Mobile hammenu) --------