var t;
var xOffset;
var yOffset;
$("td.with-tooltip").hover(function(e){
t = $(this).attr("title");
$(this).attr("title", "");
$(".desc div").text(t);
xOffset = $(".desc").height() + 30;
yOffset = -20;
$(".desc").css("position","absolute")
.css("botton",(e.pageY + xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px").fadeIn("fast");
},
function(){
$(this).attr("title", t);
$(".desc").fadeOut("fast");
});
$("td.with-tooltip").mousemove(function(e){
$(".desc")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
You should accept answers to your questions by clicking the checkmark beside the answer that helped you most...it makes your questions much more appealing to answer. Not doing it is a red-flag for many would-be answerers that there's no chance of reward for answering.