// Show the tooltip.
var tooltipShow = function(event) {
+ timerid = setTimeout(function() {
+ content.fadeIn(options.fadein);
+ }, options.delay);
var content = $("#tooltipContent").text(text).css({
position : "absolute",
top : event.pageY + 5,
padding : options.padding,
background : options.background
});
- timerid = setTimeout(function() {
- content.fadeIn(options.fadein);
- }, options.delay);
-
// console.log("start");
};
// Hide the tooltip.
var tooltipHide = function(event) {
- $("#tooltipContent").fadeOut(options.fadeout);
if (timerid) {
console.log("clear timeout");
clearTimeout(timerid);
timerid = undefined;
}
+ $("#tooltipContent").fadeOut(options.fadeout);
}
// Add hover listeners.