Skip to main content

Bug Tracker

Side navigation

#10195 closed enhancement (wontfix)

Opened September 02, 2011 07:49PM UTC

Closed September 02, 2011 08:13PM UTC

Last modified September 02, 2011 08:18PM UTC

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.

Attachments (0)
Change History (2)

Changed September 02, 2011 08:13PM UTC by rwaldron comment:1

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?

Changed September 02, 2011 08:18PM UTC by dmethvin comment:2

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.