I have a gallery of 5 thumbnails and one enlarged image. I have jqZoom attached to a large image, so when you hover over it, you can see a larger version. I am having problems when the user clicks an alternative thumbnail. I can resize a larger image, but the enlarged image remains original. I can not get jqZoom to change the enlarged image to fit the thumbnail. Here is an example of what I'm trying to do. You click on the text and change the thumbnail, but the larger image jqZoom remains unchanged. How to change this so that jqZoom uploads a new image to the zoom area?
<script type="text/javascript"> $(function() { var options = { zoomWidth: 250, zoomHeight: 250, showEffect: 'fadein', hideEffect: 'fadeout', fadeinSpeed: 'fast', fadeoutSpeed: 'fast', showPreload: true, title: false, xOffset: 100 }; $(".jqzoom").jqzoom(options); }); function changeImgSrc() { document.getElementById('bigImage').src = '4.jpg'; document.getElementById('smallImage').src = '3.jpg'; var options = { zoomWidth: 400, zoomHeight: 400, showEffect: 'fadein', hideEffect: 'fadeout', fadeinSpeed: 'fast', fadeoutSpeed: 'fast', showPreload: true, title: false, xOffset: 100, containerImgSmall: '3.jpg', containerImgLarge: '4.jpg' }; $(".jqzoom").jqzoom(options); } </script> </head> <body> <div id="content" style="margin-top:100px;margin-left:100px;"> <a id="bigImage" href="2.jpg" class="jqzoom" style="" title="Product Zoom"> <img id="smallImage" src="1.jpg" title="Product Zoom" style="border: 0px none;"> </a></select> <br> <div id="img" onClick="document.getElementById('bigImage').src = '4.jpg';changeImgSrc();">click here to change source</div> </div>
Thanks for the help!
image-manipulation
Mike
source share