Ticket #1304 (closed bug: duplicate)
Confusing unbind() with "hover"
|Reported by:||olau||Owned by:|
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