function makeToolTip(tokenId,tooltipId)
{
var left=document.getElementById(tokenId).offsetLeft;
var top=document.getElementById(tokenId).offsetTop;
var tooltipheight=document.getElementById(tooltipId).style.height;
var tooltipwidth=document.getElementById(tooltipId).style.width;
widArr= tooltipwidth.split("px");
heightArr=tooltipheight.split("px");
/*top=event.offsetX?(event.offsetX):event.pageX - document.getElementById("divChart").offsetLeft;
left=event.offsetX?(event.offsetX):event.pageX - document.getElementById("divChart").offsetLeft;
*/
top=top-heightArr[0];
left=left-widArr[0];
/*bodyHeight=document.body.clientHeight;
bodyWidth=document.body.clientWidth;*/
document.getElementById(tooltipId).style.top=top;
document.getElementById(tooltipId).style.left=left;
document.getElementById(tooltipId).style.display="block";
}
function hideToolTip(tooltipId)
{
document.getElementById(tooltipId).style.display="none";
}
Subscribe to:
Post Comments (Atom)
Your code is super.. By Aravinth
ReplyDelete