Magnifying glass function - shared file

I’d like to share here a Blocs file for anyone interested in adding a magnifying glass function to an image.
Function is derived form this code : How To Create an Image Magnifier Glass
and adapted to Blocs following what I was able to understand from directions given by @Jerry
(original conversation here if someone can understand better than me : Magnify effect on image (js, css) - #56 by ermold)
Some interesting functions are missing though.

Magnifying glass.bloc (4.1 MB)

Here are some details and commands :

  • Image is stored in a div container with the ID “magnifying-glass”
  • Image itself has a ID “myimage”
  • javascript code is in Page-Footer
  • CSS is stored into Code Editor > Additional CSS

Hope it can help.

12 Likes

That was really nice of you to share that. Thank you.

1 Like

Thanks for the share @ermold - not something I need now, but might get asked for something like this in the future.

1 Like

@ermold Thank you for being so thoughtful

1 Like