모바일에서 메뉴 오류
관련링크
http://decoria.dothome.co.kr
110회 연결
본문
모바일에서 메인메뉴를 두번 터치해야 서브메뉴가 나오네요 ㅜ 한번만 터치해서 나오게 하고싶은데, 현재 문제되는 홈페이지 주소와 menu.js파일 코딩 첨부합니다. 도움주시면 감사하겠습니다ㅜ
(function($){
$(".slide_area").css("height", "0px");
$(".sub li a").mouseenter(function(){
$(".slide_area").animate({"height":"230px"}, 500);
});
$("#wrap").mouseenter(function(){
$(".slide_area").animate({"height":"0px"}, 500);
})
var h = $(window).height()
var sw = 1;
$(".list").click(function() {
if(sw==1) {
$(".wrap").css("height", h + "px");
$(".mobile_area").slideDown(500);
sw = sw * -1;
} else {
$(".wrap").css("height", "auto");
$(".mobile_area").slideUp(500);
sw = sw * -1;
}
});
$(".mob > li > ul").css("display", "none");
var sw = 1;
$(".mob > li").click(function() {
if(sw==1) {
$(this).find("ul").slideDown(500);
sw = sw * -1;
} else {
$(this).find("ul").slideUp(500);
sw = sw * -1;
}
});
$(".list").click(function(){
$(".m_memu_wrapper").css({display: "block", background: "rgba(0, 0, 0, 0.6)", zIndex: "1000"});
$("#m_gnb").stop().animate({right: "0"}, 500);
});
var sw = 1;
$("#m_gnb>ul>li").click(function(){
if(sw==1) {
$(this).find(".tit").css("color", "#d1204e");
$(this).find(".sub").css("display", "block");
sw = sw * -1;
} else {
$(this).find(".tit").css("color", "#000000");
$(this).find(".sub").css("display", "none");
sw = sw * -1;
}
});
$(".close").click(function(){
$(".wrap").css("height", "auto");
$(".m_memu_wrapper").css({display: "none"});
$("#m_gnb").stop().animate({right: "-300px"}, 500);
});
})(jQuery);
답변을 작성하시기 전에 로그인 해주세요.