jQuery 질문합니다. 채택완료
Copy
$(document).ready(function(){
$( " .1depth > li:nth-child(1) .2depth " ).show();
$( " .1depth > li" ).on( "click", function(){
$(this).children( " .2dept " ).slideDown(500);
$(this).siblings().children( " .2dept " ).slideUp(500);
} );
});
a가 hasClass("menu") 일때 부모2인 2dept 를 show(); 하고싶습니다.
선택자 선택을 잘못하고 있나봐요 아무리 해봐도 안됩니다..
근데 2dept 의 a.menu 를 클릭해서 이동하면
.1depth 의 첫번째 자식만 계속 show 되고 있습니다 ㅠㅠ
css는 .2depth {display:none;} 걸어논 상태에요
답변 1개
채택된 답변
+20 포인트
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인