<script>
$(".depth1").mouseover(function(){
$(this).children("ul").slideDown();
});
$(".depth1").mouseleave(function(){
$(this).children("ul").slideUp();
});
</script>
이거는 코드가 잘 작동됩니다!
안되는건!
Copy
<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개
답변을 작성하려면 로그인이 필요합니다.