Opened 10 years ago

Closed 8 years ago

#3673 closed feature (fixed)

Widget: Add methods to abstract focus and hover classes

Reported by: Scott González Owned by: Scott González
Priority: major Milestone: 1.9.0
Component: ui.widget Version: 1.6rc2
Keywords: Cc:
Blocked by: Blocking:

Description

Many (all?) plugins now need to add classes on hover to take advantage of the new CSS framework. To reduce code duplication, we should add a hoverClass method to ui.core.js.

$.fn.hoverClass = function(classNames) {
	return this.hover(
		function() {
			$(this).addClass(classNames);
		},
		function() {
			$(this).removeClass(classNames);
		});
};

Change History (5)

comment:1 Changed 10 years ago by Scott González

Milestone: TBD1.6
Owner: set to scott.gonzalez
Status: newaccepted

comment:2 Changed 10 years ago by Scott González

Also add .focusClass()

See Google group discussion.

comment:3 Changed 10 years ago by Scott González

Milestone: 1.61.next

comment:4 Changed 8 years ago by Scott González

Component: ui.coreui.widget
Milestone: 1.next1.9
Status: acceptednew
Summary: Add hoverClass methodWidget: Add methods to abstract focus and hover classes

comment:5 Changed 8 years ago by Scott González

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.