Reputation: 2541
Is there a way to include both: $(this)
and $("h3", this)
in the same line?
Maybe something like $("h3,", this)
?
I know that's not right but I've never heard of the equivalent.
Upvotes: 2
Views: 56
Reputation: 817208
You can use .andSelf
[docs]:
$(this).find('h3').andSelf()
It merges the previously selected elements in the stack ($(this)
) with the current selection ($(this).find('h3')
).
Upvotes: 9