elevateweb / elevatezoom

1.03k stars 492 forks source link

the page scroll option does not work on Mobile. #126

Open harnishdesign opened 8 years ago

harnishdesign commented 8 years ago

when you check the elevateZoom on Mobile, the page scroll option does not work when we click on the image although we off the zoom option. which is a trouble.

any solution for that?

Avaroth commented 8 years ago

I fixed this by removing all preventDeafult()'s in 'touchmove' event-bindings.

marsshall commented 8 years ago

Hi, better than editing original elevatezoom.js file is to apply easy patch in your additional javascript file, try this:

// get touchmove works
$("#gallery-canvas").bind('touchstart', function(){
    $("#gallery-canvas").unbind('touchmove');
});

//initiate the plugin and pass the id of the div containing gallery images
  $("#gallery-canvas").elevateZoom({
    gallery: 'gallery-thumbs', 
    cursor: 'pointer', 
    galleryActiveClass: 'active', 
    cursor: 'zoom', 
    zoomType: 'inner',
    zoomWindowFadeIn: 500,
    zoomWindowFadeOut: 500,
    responsive:true,
    //imageCrossfade: true,
    loadingIcon: '/assets/images/ajax-loader.gif'
  }); 

  //pass the images to Fancybox
  $("#gallery-canvas").bind('click', function(){
    var ez =   $('#gallery-canvas').data('elevateZoom'); 
    $.fancybox(ez.getGalleryList());
    return false;
  });

also you can hide zoomContainer to prevent hovering zoom:

.zoomContainer {
  cursor: -webkit-zoom-in!important; 

  @include breakpoint(medium down){
    visibility: hidden;
  }
}
gdoron commented 8 years ago

@marsshall It didn't work for me at all. BTW, there must be better libraries for gallery, right? This library has enormous amount of bugs and isn't being maintained for years. :cry:

theedov commented 6 years ago

Had to use special apps to track visitors screen to find why my bounce rate is that high. Use this library on websites like ecommerce in product view = really high bounce rate = no money.