Ok 변수에 jquery 객체가 있고 다른 객체의 부모인지 테스트하고 싶습니다. 그게 가능하니?jQuery : jquery 객체와 함께 parents()를 매개 변수로 사용하는 방법은 무엇입니까?
var fatherElement= $('#fatherElement');
if($('#sonElement').parents(fatherElement).length>0){
alert('Luke I AM your father!');
}
드리프트를 잡으시겠습니까? 이 릴 '문제에 도움이 사랑 :)
멋집니다! 이것이 어떻게 작동하는지 조금 더 설명해 주시겠습니까? – wilsonpage
다음 URL을 확인하십시오 : http://api.jquery.com/jQuery/#selector-context – Chandu