Bug Tracker

Opened 14 years ago

Closed 12 years ago

#4919 closed feature (wontfix)

Add a hoverClass method

Reported by: joern Owned by:
Priority: low Milestone: 1.next
Component: attributes Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


The following 5 lines are repeated across applications and plugins again and again. I propose to add a plugin method to jQuery core to reduce these to simple one liners:

$(".selector").hover(function() {
}, function() {

Plugin method and usage:

$.fn.hoverClass = function(hoverClass) {
  return this.hover(function() {
  }, function() {

Change History (6)

comment:1 Changed 14 years ago by scottgonzalez

comment:2 Changed 12 years ago by Rick Waldron

Component: coreattributes
Keywords: event attributes added
Milestone: 1.41.5
Priority: majorlow
Status: newopen

comment:3 Changed 12 years ago by anonymous

This is pretty much duplicating the functionality already available in CSS with :hover pseudo-classes.

comment:4 Changed 12 years ago by arshadabbas

You can use:




Instead of:


comment:5 Changed 12 years ago by dmethvin

Keywords: needsreview added; event attributes removed
Milestone: 1.51.next

comment:6 Changed 12 years ago by addyosmani

Keywords: needsreview removed
Resolution: wontfix
Status: openclosed

Following on from Scott_Gonzalez, the dev thread above and here point to there being a group consensus that this wouldn't really be that useful. We're closing as wontfix for now, unless there is a massive change in group thinking on why this shouldnt be the case.

Note: See TracTickets for help on using tickets.