moefinley
moefinley

Reputation: 1339

With JQuery is $(this).find(e.target) the same as $(e.target, this)

JQuery error?

I've always thought it was until I got the above. Am I missing something?

The "input#header-login-email-input.initial-value" is not within "this".

Thanks

Upvotes: 3

Views: 448

Answers (1)

Michał Wojciechowski
Michał Wojciechowski

Reputation: 2490

I assume e.target is the target property of an Event object, so it's a DOM element. When you call $() on a DOM element, it just wraps the element in a jQuery object and returns that, so the context parameter (this) doesn't really do anything.

Upvotes: 2

Related Questions