Relative Content

Tag Archive for javascripthtmlcsszoomingpinchzoom

How to recreate browser zoom functionality in javascript?

So I have a page with images that can be clicked on to show a zoomed-in image. I want to allow the user to zoom in further, with pinch motions/wheel on various parts of the image as, as one normally can in a browser. However, once they click on the image to zoom out, I want the original scale of the page to be restored, regardless of how much they zoomed in.