PDA

View Full Version : DIV revealed at mouse cursor



alemieux34
January 15th, 2008, 04:30 PM
I have a page with a list of links on it. These links activate hidden divs that are absolutely positioned when someone hovers over them. The divs are absolutely positioned right now, but I was wondering if there was a way to get the div to appear in proximity to the mouse? Has anyone seen something like this or know how it's done?

Thanks.

borrob
January 16th, 2008, 03:33 AM
you can use the mouse event function and
position your div


pos_x = window.event.x + document.body.scrollLeft;
pos_y = window.event.y + document.body.scrollTop;