Skip to main content

Bug Tracker

Side navigation

#1304 closed bug (duplicate)

Opened June 19, 2007 01:26PM UTC

Closed June 21, 2007 05:52PM UTC

Confusing unbind() with "hover"

Reported by: olau Owned by:
Priority: major Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:

I have a div element that I bind to with div.hover(...) and with a custom event with div.bind("groupschanged", ...). Now, when I dynamically need to disable the hover, I would have thought I could simply call unbind("hover") on the div. But this removes the binding to the "groupschanged" event too.

Maybe it's just the documentation that's not terribly clear, but I think there's two bugs in this. First that I can't remove the hover event with unbind("hover") (what string do I need to pass?).

Second that unbind("sometype") removes all callbacks if it doesn't find one of the right type. It should only try to remove those of the type "sometype". The latter simply appears to be a question of changing "if (type && element.$events[type])" on line 1224 into a nested if

Attachments (0)
Change History (1)

Changed June 21, 2007 05:52PM UTC by brandon comment:1

resolution: → duplicate
status: newclosed

hover is not actually an event, just a helper. If you need to undo the hover then you can unbind('mouseover').unbind('mouseout'). The other part is fixed and logged at #1047.