elevatezoom-plus icon indicating copy to clipboard operation
elevatezoom-plus copied to clipboard

Unable to destroy instance

Open infobahn opened this issue 8 years ago • 2 comments

I have a gallery of images and I'm trying to destroy my elevatezoom instance so I can change the main image and open a new one. I'm using the following code:

plugin = $('.main-image').data('ezPlus');

if (plugin) {
        plugin.showHideZoomContainer(action);
        plugin.showHideWindow(action);
        plugin.showHideTint(action);
        plugin.showHideLens(action);
        plugin.destroy;
}

But I get the following error:

Uncaught TypeError: plugin.destroy is not a function

I might be being stupid, but I can't work out what I'm doing wrong!

infobahn avatar Jul 24 '17 10:07 infobahn

I'm having the same problem. Has anyone found a solution?

bcase10 avatar Sep 12 '17 21:09 bcase10

Is the code getting called twice? ezPlus destroy does not turn off data('ezPlus') (I think it should)

lastobelus avatar Oct 24 '17 05:10 lastobelus