자바스크립트 반응형 질문입니다~ 채택완료
$(".depth1").mouseover(function(){
$(this).children("ul").slideDown();
});
$(".depth1").mouseleave(function(){
$(this).children("ul").slideUp();
});
이거는 코드가 잘 작동됩니다!
안되는건!
</p>
<p> </p>
<p> <script></p>
<p> if(windowWidth > 1300){</p>
<p> $(".depth1").mouseover(function(){</p>
<p> $(this).children("ul").slideDown();</p>
<p> });</p>
<p> $(".depth1").mouseleave(function(){</p>
<p> $(this).children("ul").slideUp();</p>
<p> });</p>
<p> }else{</p>
<p> $(".depth1").click(function(){</p>
<p> $(this).children("ul").slideToggle();</p>
<p> });</p>
<p> }</p>
<p> </script></p>
<p> </p>
<p>
이게 적용이 되지 않습니다 ㅠㅠ 왜그럴까요?
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
4년 전
windowWidth
변수가 어디서 어떻게 생성되었는지 알아보셔야 할것 같네요.
window.innerWidth, window.outerWidth등의 함수가 기본 함수입니다
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
채택
채택
채택
답변대기
채택
채택
채택
답변대기
답변대기
답변대기
채택
채택
채택
채택
채택
채택
채택
답변대기