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

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

QA

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

답변 1

본문

    <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

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 206
© SIRSOFT
현재 페이지 제일 처음으로