Skip to content

Instantly share code, notes, and snippets.

@nicksheffield
Created December 29, 2022 06:24
Show Gist options
  • Save nicksheffield/8fc6f3341a831b2944c1c2157b062ed8 to your computer and use it in GitHub Desktop.
Save nicksheffield/8fc6f3341a831b2944c1c2157b062ed8 to your computer and use it in GitHub Desktop.
clientX, clientY explanation
clientX/Y: 0,0 is top left of the browser window (under the toolbar/bookmarks bar)
offsetX/Y: 0,0 is top left of clicked element
screenX/Y: 0,0 is top left of monitor/display
pageX/Y: 0,0 is top left of page content, including scroll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment