Skip to content

Instantly share code, notes, and snippets.

@ericabouaf
Created March 7, 2010 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericabouaf/324643 to your computer and use it in GitHub Desktop.
Save ericabouaf/324643 to your computer and use it in GitHub Desktop.
/**
* Methods to persist the tooltip if we are hovering over the tooltip element
*/
YAHOO.util.Event.addListener(this.tooltip.element, "mouseover", function(e,obj) {
if (this.hideProcId) {
clearTimeout(this.hideProcId);
this.hideProcId = null;
}
}, this.tooltip, true);
YAHOO.util.Event.EVT.addListener(this.tooltip.element, "mouseout", function(e,obj) {
if (this.showProcId) {
clearTimeout(this.showProcId);
this.showProcId = null;
}
if (this.hideProcId) {
clearTimeout(this.hideProcId);
this.hideProcId = null;
}
var me = this;
this.hideProcId = setTimeout(function () {
me.hide();
}, this.cfg.getProperty("hidedelay"));
}, this.tooltip, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment