1

好的...如何选择具有指定类名的元素的父级子级..?

4

2 回答 2

5

“元素的父母的孩子”被称为兄弟姐妹

$(this).siblings(".theClassYou'reAfter")
于 2009-07-30T21:54:04.007 回答
0
$(this).parent("div").child(".className")

此外,父元素的子元素在技术上是当前元素的兄弟,因此您可以尝试:

$(this).siblings(".className")
于 2009-07-30T21:52:15.120 回答