我想知道如何在移动设备上(尤其是在Chrome浏览器中)显示时启用网站缩放功能。
我正在使用elevate Zoom-一个jQuery图像缩放插件-它在桌面上运行,但移动视图不起作用。
使用的插件:https://www.elevateweb.co.uk/image-zoom/examples/#mousewheel
站点(桌面正在运行:https://www.shadowboxmilitarygear.com/Vietnam-T-shirt-for-the-back
我还需要该插件才能与移动设备一起使用。请任何传说能尽快帮助我吗?我会很感激你的建议。我等待着你的回应。
您对启用移动chrome的缩放功能有什么想法?
HTML
<select id="select">
<option value="1">Front</option>
<option value="2">Back</option>
<option value="3">Scenery</option>
<option value="4">Side</option>
</select>
JAVASCRIPT
$("#zoom_09").elevateZoom({
gallery : "gallery_09",
galleryActiveClass: "active"
});
$("#select").change(function(e){
var currentValue = $("#select").val();
if(currentValue == 1){
smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image1.png';
largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image1.jpg';
}
if(currentValue == 2){
smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image2.png';
largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image2.jpg';
}
if(currentValue == 3){
smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image3.png';
largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image3.jpg';
}
if(currentValue == 4){
smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image4.png';
largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image4.jpg';
}
// Example of using Active Gallery
$('#gallery_09 a').removeClass('active').eq(currentValue-1).addClass('active');
var ez = $('#zoom_09').data('elevateZoom');
ez.swaptheimage(smallImage, largeImage);
});
非常有用