PDA

View Full Version : DD Tool Tip - tips going off top of window



HocusPocus
04-13-2011, 12:21 PM
1) Script Title: Cool DHTML Tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm

3) Describe problem:

I'm using this script to allow users to preview announcements when hoving the mouse over the link however when the announcement is near the top of the page the tooltip is pushed off the top of the window so the first few lines are not visible - please see the attached image - the mouse is hovering over the first announcement but the announcement tooltip box is too high.

Has anyone else seen this? I'm loathe to hack around the script but the problem seems to reside in the positiontip() function:



if (bottomedge < tipobj.offsetHeight) {
tipobj.style.top = isIE ? ietruebody().scrollTop + event.clientY - tipobj.offsetHeight - offsetypoint + "px" :
window.pageYOffset + e.clientY - tipobj.offsetHeight - offsetypoint + "px";
}
else {
tipobj.style.top = curY + offsetypoint + "px";
}


Any help would be appreciated.

Thanks in advance.
Dave