我一直以为是这样的,直到看到上面的错误信息。我是否漏掉了什么?
"input#header-login-email-input.initial-value" 不在 "this" 之内。
谢谢。
我一直以为是这样的,直到看到上面的错误信息。我是否漏掉了什么?
"input#header-login-email-input.initial-value" 不在 "this" 之内。
谢谢。
我认为e.target
是一个Event
对象的目标属性,因此它是一个DOM元素。当您在DOM元素上调用$()
时,它只是将元素包装在jQuery对象中并返回该对象,因此上下文参数(this
)实际上没有任何作用。
code
$("body").click(function (e) { $(".ui-tabs-handle-dropdown").filter(function () { return $(this).find(e.target).length ? false : true; }).tabsHandleDropdown("resetTabs"); });code
- moefinley