Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10195 closed enhancement (wontfix)

bind() doesn't support hover events

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: event Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:

Description

When using live() or delegate(), I can use "hover" as a shortcut for "mouseover mouseout". bind() does not yet support this.

Change History (2)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledevent
Priority: undecidedlow
Resolution: wontfix
Status: newclosed

"hover" is a shortcut to:

this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );

which is essentially a shortcut to:

this.bind("mousenter", fnOver).bind("mouseleave", fnOut || fnOver );

Why would you want to add another layer to that?

comment:2 Changed 12 years ago by dmethvin

Also, .bind("hover" ...) does not deliver a hover event to the handler. You either get a mouseenter or a mousleave event. For the sake of those that are destined to maintain the code, just say .bind("mouseenter mouseleave" ...) and make it clear what you are doing.

Note: See TracTickets for help on using tickets.