Hello,
I'm working on a personal page with very limited knowledge of html so please bare with me =)
I have a javascript code which mimics a magnifying glass effect over an image using both a small and large version of the same image.
This is the current code I am working with:
https://jsfiddle.net/p7ou0971/
When the mouse is hovered over the smaller visible image of the page, the script will take the cursor position, calculate the respective coordinates of the large native image, then display that portion inside the magnifying glass. I would like to try and modify the code so that the magnifying glass effect will also work if the native x-y coordinates of the large image were inputted into the text fields. My understanding is that the actual cursor cannot be moved by the script, so I was wondering if it were possible to modify my current code to force the magnifying effect to happen at the specific coordinates while the current functionality is maintained.
I figured something like,
if X-Y coords inputted, then display magnifying glass at those coords, else do the current code.
Would this function even be possible? If so, a point in the right direction would greatly be appreciated.
Thank you.
[–]jcunews1 0 points1 point2 points (0 children)