This JavaScript utility reads the clicked pixel offset of specified images, relative to the top left corner of the image. Works properly even when images are contained within a scrolled div container. Writing scripts that need this data is greatly simplified, since any user-script can interface with this one via a user-supplied function. Whenever a configured image is clicked, the user function is called to trigger other routines that require the clicked co-ordinates.
ImageClickOffset
Reads the Relative Clicked Cursor Offset of Images
The simple solution to a common requirement
Works even when an image is within a scrolled div.
Can trigger any other code via a user-supplied function.
Supports multiple image groups, each able to call a different function.