elevateZoom - jQuery 图像缩放插件

我想知道如何在移动设备上显示我的网站(尤其是在 Chrome 浏览器中)时启用缩放功能。

我正在使用提升缩放 - 一个 jQuery 图像缩放插件 - 它在桌面上工作,但移动视图不起作用。

使用的插件:https : //www.elevateweb.co.uk/image-zoom/examples/#mousewheel

网站(桌面正在运行):https : //www.shadowboxmilitarygear.com/Vietnam-T-shirt-for-the-back

我也需要该插件才能与移动设备一起使用。

您对我可以做些什么来启用移动 chrome 上的缩放有任何想法吗?


繁星点点滴滴
浏览 171回答 1
1回答

FFIVE

HTML<select id="select">&nbsp;<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({&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gallery : "gallery_09",&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; galleryActiveClass: "active"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });&nbsp;&nbsp; &nbsp; &nbsp;$("#select").change(function(e){&nbsp; &nbsp;var currentValue = $("#select").val();&nbsp; &nbsp;if(currentValue == 1){&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image1.png';&nbsp; &nbsp;largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image1.jpg';&nbsp; &nbsp;}&nbsp; &nbsp;if(currentValue == 2){&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image2.png';&nbsp; &nbsp;largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image2.jpg';&nbsp; &nbsp;}&nbsp; &nbsp;if(currentValue == 3){&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image3.png';&nbsp; &nbsp;largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image3.jpg';&nbsp; &nbsp;}&nbsp; &nbsp;if(currentValue == 4){&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;smallImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/small/image4.png';&nbsp; &nbsp;largeImage = 'http://www.elevateweb.co.uk/wp-content/themes/radial/zoom/images/large/image4.jpg';&nbsp; &nbsp;}&nbsp; &nbsp; // Example of using Active Gallery&nbsp; $('#gallery_09 a').removeClass('active').eq(currentValue-1).addClass('active');&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;var ez =&nbsp; &nbsp;$('#zoom_09').data('elevateZoom');&nbsp; &nbsp;&nbsp;&nbsp; ez.swaptheimage(smallImage, largeImage);&nbsp;&nbsp; &nbsp; });很有帮助
打开App,查看更多内容
随时随地看视频慕课网APP