Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to destroy instance #84

Open
infobahn opened this issue Jul 24, 2017 · 2 comments
Open

Unable to destroy instance #84

infobahn opened this issue Jul 24, 2017 · 2 comments

Comments

@infobahn
Copy link

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!

@bcase10
Copy link

bcase10 commented Sep 12, 2017

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

@lastobelus
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants