Side navigation
#6356 closed bug (invalid)
Opened March 25, 2010 10:47PM UTC
Closed November 19, 2010 07:35AM UTC
$.proxy not working within bind
Reported by: | CuAnnan | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | event | Version: | 1.4.2 |
Keywords: | proxy, bind | Cc: | |
Blocked by: | Blocking: |
Description
$(anObject).bind(
'cardMoved',
$.proxy(this, 'methodName')
);
In the instance I'm working on, it works fine if it's a standard function like
$(anObject).bind(
'cardMoved',
function(){console.log('event fired')
);
but if I use proxy, there's an exception thrown.
Attachments (1)
Change History (2)
Changed November 12, 2010 02:40AM UTC by comment:1
milestone: | 1.4.3 |
---|
Changed November 19, 2010 07:35AM UTC by comment:2
priority: | → undecided |
---|---|
resolution: | → invalid |
status: | new → closed |
Thanks for the report, but this is not a jQuery bug. Inside an event handler, this
is bound to the Element, not your object. In the future, please use the jQuery Forum for support requests.
Resetting milestone to future.