2013-09-26 2 views

답변

3

찾기에 특히 유용합니다 :

$(domElementRef).find(".product"); 
// or inside an event handler where 'this' is the DOM element the event applied to: 
$(this).find(".product"); 
:

var $elements = $("div"); 
// some code that does other stuff with $elements 
// ... 
// then 
var $products = $elements.find(".product"); 

또는 당신은 부모/조상 DOM 요소에 대한 직접 참조를 경우에도

부모/조상 요소에 대한 처리를 수행 할 필요가없는 경우 결합 된 선택자를 $("div .product")과 함께 사용하면됩니다.