Can we popup a window with pinch zoom capability on mobile site
-
27-06-2021 - |
Pregunta
While browsing the mobile site, we can't pinch zoom the window size because the pinch zoom function is disabled.
But I want enable the pinch zoom function on a popup window when user click the small image on the site, so that they can pinch zoom that image on the popup window.
Is jQuery or JavaScript can achieve this function?
Thanks
Solución 2
Just find a jQuery plugin to achieve this action, https://github.com/eightmedia/hammer.js
Otros consejos
Yes, it can be achieved with JavaScript. I have recently done the same thing.
You need to bind to touchstart
, touchmove
and touchend
events and use event.scale
with transform: scale()
to do it.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow