Mario-Duarte / image-zoom-plugin

Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries.
https://mario-duarte.github.io/image-zoom-plugin/
MIT License
11 stars 4 forks source link

Changing Images Issue #12

Closed kwiksys closed 2 years ago

kwiksys commented 2 years ago

Trying out this plugin. Having issue on changing another image in the plugin.


       <div class="inner">
        <h1>Image Zoom jQuery Demo</h1>
        <div class="image-container">
            <img id="picZoom" src="https://picsum.photos/1080/720" alt="A image to apply the ImageZoom plugin">
        </div>
    </div>

Script . After 4 seconds it will add the new image but it didn't. Appreciate your help .


<script>
$(document).ready(function () {

              var zoomImage = $('#picZoom'); 
           zoomImage.imageZoom();

                setTimeout(function () {

                        var newImageUrl = "https://localhost:7196/templates/imageFile.jpg";
                         $("#picZoom").attr("src", newImageUrl);                        

                     }, 4000);
  });

</script>

Regards Pedro

kwiksys commented 2 years ago

Managed to resolved this issue.