开发者

With JQuery is $(this).find(e.target) the same as $(e.target, 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜