Skip to content Skip to sidebar Skip to footer

Scrolling Not Working In Mobile On Image Of Elevatezoom.js Data-zoom-image

I used following code for zoom images in product details page but on when image of zoom pluging you want to scroll and you stand on the image with your finger can not scroll Up or

Solution 1:

Issue solved by doing this :

Search for touchmove event in jquery.elevatezoom.js and remove preventDeafult() from mobile view.

Solution 2:

I've just had the same problem, and your answer was very helpful, but by removing preventDefault() the functionality of elevatezoom is removed from the desktop view.

I would remove only for mobile using javascript mediamatch:

if (window.matchMedia("(max-width: 640px)").matches) {
                /* The viewport is less than, or equal to, 640 pixels wide */
                } else {
                /* The viewport is greater than 640 pixels wide */
                e.preventDefault();
                }

To make the above change goto your elevatezoom.js and find 'e.preventDefault();' and replace with the above code. Change max-width: 640px to your desired view port.

Hope that helps someone

Post a Comment for "Scrolling Not Working In Mobile On Image Of Elevatezoom.js Data-zoom-image"