I'm currently utilizing cloudzoom with the given markup:
<div id="container">
<img id="main-image" class="cloudzoom" src="/img/image1.jpg" data-cloudzoom="variableMagnification: false, zoomOffsetX: 0, zoomPosition: 'inside', zoomImage: '/img-zoom/image1.jpg" />
<div id="thumbnail-images">
<img class='cloudzoom-gallery' src="/img/image2.jpg" data-cloudzoom="useZoom: '.cloudzoom', image: '/img/image2.jpg', zoomImage: '/img-zoom/image2.jpg'">
<img class='cloudzoom-gallery' src="/img/image3.jpg" data-cloudzoom="useZoom: '.cloudzoom', image: '/img/image3.jpg', zoomImage: '/img-zoom/image3.jpg'">
</div>
</div>
To initialize cloudzoom, I am using this code:
$('#container', context).once('initiateCloudzoom').each(function () {
CloudZoom.quickStart();
});
Although the current implementation is functioning properly, my inquiry is:
How can I deactivate cloudzoom if the main image's width falls below X pixels?
In addition, how can I toggle the enable/disable state of cloudzoom when clicking on a thumbnail based on the same image width condition once the image has been swapped?
Thank you in advance.