Honestly, it will be a pain. You need
- determine the size and position of each element that the mouseover handler should receive.
- add to the scroll window.
- In the handler, find the position of the mouse cursor and pageOffset.
- Find out which element the cursor is in.
- manually call the handler of the actual manipulator
- (Find out what elements of the cursor remain if you also want some kind of mouse behavior)
You may need to recalculate the positions and sizes of the elements if they are dynamic. (move 1. below 3.)
Although this should work well with block-level elements, I have absolutely no idea about a solution for inline elements.
user123444555621
source share