In the tutorial “Mouse coordinates (absolute position) with prototype” i have show u how to get the mouse position.
But sometimes we just want to know if the mouse is in a certain element and what position is the mouse in the element.
We use prototype for this.
Download the sample project: project.zip .
In the body of the html we create a div with id debug for showing some important information.
And we create a div with id container, we want to see if the cursor moves over the container-div and get the relative position
of the cursor in the div. (continue reading…)