모바일에서 메뉴 오류

모바일에서 메뉴 오류

QA

모바일에서 메뉴 오류

본문

모바일에서 메인메뉴를 두번 터치해야 서브메뉴가 나오네요 ㅜ 한번만 터치해서 나오게 하고싶은데, 현재 문제되는 홈페이지 주소와 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);

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
전체 34
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT