Skip to content Skip to sidebar Skip to footer

Zoom Effect Only Zooms Original Image Not New Image From Thumbnail

INFO I have a grid of div's. Each div opens a modal. Each modal has a simple thumbnail gallery (click thumbnail, main image is replaced). PROBLEM Zoom is only working with the orig

Solution 1:

The problem that you have is that the simplegallery is not aware of the zoom plugin that you are using.

The zoom plugin creates a new element with the first image that he finds based on the element you supply.

In order to make the zoom plugin change the image that you are zooming you need to make sure that image is updated to the one that you just clicked.

Add this code after you initialize the zoom plugin:

$('.thumb img').click(function() {
    $('.zoomImg').attr('src', $(this).attr('src'));
});

It should solve your problem.

Post a Comment for "Zoom Effect Only Zooms Original Image Not New Image From Thumbnail"