Opened 13 years ago
Closed 13 years ago
#8562 closed bug (invalid)
In a javascript 'class' where 'this' refers to the object, hover with proxy does not work, but mousenter/mouseleave does.
Reported by: | rfitzhugh | Owned by: | rfitzhugh |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Change History (3)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | set to rfitzhugh |
---|---|
Status: | new → pending |
comment:3 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Hm. It actually looks like you're just using proxy wrong in the hover statement.
.hover($.proxy(this.doHover,this),$.proxy(this.unDoHover,this)); is what you should be using. The way you have it now, it's just creating new proxy functions on every hover, and never firing them.
Note: See
TracTickets for help on using
tickets.
Using IE8 and jQuery 1.5. Have simple jscript 'class'. Discovered that hover with proxy (where 'this' refers to the jscript object) does not work (meaning the function(s) in the hover never execute) although mouseenter/mouseleave with the same proxy and functions do work.
The following works:
The following does NOT work:
.hover(function() {$.proxy(this.doHover, this)}, function () {$.proxy(this.unDoHover, this)})
No errors are thrown, but the functions do not execute.
Thank you.