elevatezoom-plus
elevatezoom-plus copied to clipboard
Unable to destroy instance
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!
I'm having the same problem. Has anyone found a solution?
Is the code getting called twice? ezPlus destroy does not turn off data('ezPlus') (I think it should)