image of elevatezoom not scrolling in Cell Phone

3.7k views Asked by At

image of elevatezoom not scrolling in Cell Phone

When there is a picture of elevatezoom pluging And you want the Scroll And you stand on the image with your finger Can not Scroll Up or Down in mobile phones

need help

2

There are 2 answers

0
Tim Ramsey On

I was looking to destroy elevateZoom on mobile for a better user experience and was running into the same issue. I couldn't scroll the webpage when I tried over the image. I found that the touchmove event is prevented from normal function via the following code:

b.$elem.bind("touchmove", function(a) {
            a.preventDefault();
            b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0])
        });

I removed elevateZoom and un-binded touchmove with the following code.

        $('#imgzoom').removeData('elevateZoom');
        $('.zoomWrapper img.zoomed').unwrap();
        $('.zoomContainer').remove();
        $("#imgzoom").unbind("touchmove");
0
PWD On

This works in elevateZoom 3.0.8:

In elevatezoom.js, search for "touchmove" and "touchend" and remove or comment all binds that use these words. Now you can scroll on mobile devices (using touch), and the lens still works on desktop.