开发者

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

开发者 https://www.devze.com 2023-04-09 00:51 出处:网络
I\'ve alw开发者_Python百科ays thought it was until I got the above. Am I missing something? The \"input#header-login-email-input.initial-value\" is not within \"this\".

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

I've alw开发者_Python百科ays 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号