jQuery:包括这个的多个选择器

meo*_*meo 1 jquery

我想选择'这个'和其他东西.例如:

$(this + ', ' + this + ' > div')
Run Code Online (Sandbox Code Playgroud)

我怎么能做这个工作?这可能在一个选择器中吗?

Nic*_*ver 6

您可以使用.andSelf()跳回链中并包含元素,如下所示:

$(this).children("div").andSelf()
Run Code Online (Sandbox Code Playgroud)

所以我们从this它的孩子们那里开始,然后.andSelf()在那个系列中添加了之前的链接this.