Tooltip: Replacing mouseover/out with mouseenter/leave, dropping (for now) support for event delegation

This commit is contained in:
jzaefferer 2010-03-25 14:46:42 -04:00
parent 2766e1997a
commit e285e43d2b
2 changed files with 4 additions and 4 deletions

View File

@ -20,10 +20,10 @@
function enable() {
// default
$("#context1, form input, #childish").tooltip();
$("#context1 a, form input, #childish").tooltip();
// custom class, replaces ui-widget-content
$("#context2").tooltip({
$("#context2 [title]").tooltip({
tooltipClass: "ui-widget-header"
});
$("#right1").tooltip({

View File

@ -43,10 +43,10 @@ $.widget("ui.tooltip", {
.appendTo(this.tooltip);
this.opacity = this.tooltip.css("opacity");
this.element
.bind("focus.tooltip mouseover.tooltip", function(event) {
.bind("focus.tooltip mouseenter.tooltip", function(event) {
self.show($(event.target));
})
.bind("blur.tooltip mouseout.tooltip", function(event) {
.bind("blur.tooltip mouseleave.tooltip", function(event) {
self.close();
});
},