자바스크립트 반응형 질문입니다~

자바스크립트 반응형 질문입니다~

QA

자바스크립트 반응형 질문입니다~

본문

    <script>

        $(".depth1").mouseover(function(){

                $(this).children("ul").slideDown();

                });

            $(".depth1").mouseleave(function(){

                $(this).children("ul").slideUp();

            });

    </script>

 

이거는 코드가 잘 작동됩니다!

 

안되는건!

 


 
    <script>
        if(windowWidth > 1300){
            $(".depth1").mouseover(function(){
                $(this).children("ul").slideDown();
                });
            $(".depth1").mouseleave(function(){
                $(this).children("ul").slideUp();
            });
        }else{
            $(".depth1").click(function(){
            $(this).children("ul").slideToggle();
        });
        }
    </script>
 

 

이게 적용이 되지 않습니다 ㅠㅠ 왜그럴까요?

이 질문에 댓글 쓰기 :

답변 1

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

회원로그인

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