Displaying 1 to 1 from 1 results

mouse-event-offset - get relative position in an element on mouse clicks

  •    Javascript

Computes the [ offsetX, offsetY ] from a mouse or touch event, relative to the top left of the target element. Pass a MouseEvent or TouchEvent as event.