그건 XPath가 아닙니다. 이 셀렉터는 스타일 속성이 현재 선택된 요소 (this
)의 line-height
을 포함하는 요소를 선택합니다.
$(this) // selects the current element
.find(...) // Select all elements which match the selector:
*[style*='line-height'] // Any element (*),
// whose style attribute ([style])
// contains "line-height" (*='line-height')
다음과 같이 구현 될 수있다 :
// HTML:
// <div id="test">
// <a style="line-height:10px;color:red;">...
$("#test").click(function(){
// this points to <div id="test">
var all_line_height = $(this).find("*[style*='line-height']");
alert(all_line_height.length); //Alerts 1
})
첫 번째 별표 방법에 의해 필요하지 않습니다. – pimvdb