Reputation: 1793
Can't quite figure this out. If I use:
$('> .someClass', this);
It will select this > .someClass
, but I want to select this
AND this > child
Tried
$(this+'> .someClass', this);
//AND
var currentEl = $(this);
$(currentEl, currentEl+'> .someClass')
Any help would be appreciated.
Upvotes: 1
Views: 92
Reputation: 38345
You can use the .andSelf()
function to add this
to the set of matched elements, like so:
$(this).find('> .someclass').andSelf();
Upvotes: 1