elevateZoom - jQuery 图像缩放插件
elevateZoom - jQuery image zoom plugin
我想知道如何在移动设备(尤其是 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);
});
很有帮助
我想知道如何在移动设备(尤其是 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);
});
很有帮助