Calendar: Fix hover event setting and removing

This commit is contained in:
Felix Nagel 2014-06-18 02:49:30 +02:00 committed by Scott González
parent b9d8f624ba
commit 2e2787dcfe

View File

@ -73,8 +73,7 @@ return $.widget( "ui.calendar", {
"keydown .ui-calendar-calendar": "_handleKeydown"
});
// TODO Use hoverable (no delegation support)? convert to _on?
this.element.delegate( ".ui-calendar-header button, .ui-calendar-calendar a", "mouseenter.calendar mouseleave.calendar", function() {
this.element.on( "mouseenter.calendar mouseleave.calendar", ".ui-calendar-header button, .ui-calendar-calendar a", function() {
$( this ).toggleClass( "ui-state-hover" );
});