Bug Tracker

Modify

Ticket #10195 (closed enhancement: wontfix)

Opened 21 months ago

Last modified 21 months ago

bind() doesn't support hover events

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

Description

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

Change History

comment:1 Changed 21 months ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to event

"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 21 months 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.