Reputation: 403
I need to check with which element does 'this' match. Is it possoble?
Smth like this:
if(this == ...) {
alert(true);
}
Upvotes: 2
Views: 75
Reputation: 8198
if($(this).is('selector')) {
alert(true);
}
Where 'selector' is your typical jQuery selector, and it will return true if it matches.
Upvotes: 4