2012-08-23 2 views
1

정말 이것을 이해할 수 없습니다. 내가 사용하는 경우 : 그것은 this > .someClass을 선택합니다

$('> .someClass', this); 

,하지만 난 thisthis > child

$(this+'> .someClass', this); 
//AND 
var currentEl = $(this); 
    $(currentEl, currentEl+'> .someClass') 

어떤 도움

을 시도 선택합니다 감상 할 수있다.

답변

1

당신과 같이, 일치하는 요소의 집합에 this를 추가 할 .andSelf() 기능을 사용할 수 있습니다 :

$(this).find('> .someclass').andSelf(); 
관련 문제