Widget: Add methods to abstract focus and hover classes
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)
Milestone: |
TBD →
1.6
|
Owner: |
set to scott.gonzalez
|
Status: |
new →
accepted
|
Component: |
ui.core →
ui.widget
|
Milestone: |
1.next →
1.9
|
Status: |
accepted →
new
|
Summary: |
Add hoverClass method →
Widget: Add methods to abstract focus and hover classes
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Also add .focusClass()
See Google group discussion.