Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

image of elevatezoom not scrolling in Cell Phone

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

like image 816
lior ben yosef Avatar asked Nov 11 '14 14:11

lior ben yosef


1 Answers

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");
like image 94
Tim Ramsey Avatar answered Nov 03 '22 14:11

Tim Ramsey