DEV Community

Discussion on: Useful JavaScript Code Snippets

Collapse
 
webreflection profile image
Andrea Giammarchi

event.layerX and event.layerY, for relative coordinates, are also an option, implemented in pretty much all modern browsers (it's some sort of long time available de-facto standard).