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

How to destroy plugin instance? #10

Closed
sbespalov opened this issue Oct 28, 2016 · 5 comments
Closed

How to destroy plugin instance? #10

sbespalov opened this issue Oct 28, 2016 · 5 comments
Milestone

Comments

@sbespalov
Copy link
Contributor

sbespalov commented Oct 28, 2016

Hi.
Is there any methods to destroy plugin instance? Something like $( element ).loading('destroy')?
The problem is that when i am doing $( element ).loading('stop') the overlay div element still exists in the DOM.

@CarlosBonetti
Copy link
Owner

Hi! Currently, there is no such method but I think it would be a nice addition! You can open a PR if you like.

For now, you can use:

$(element).Loading().overlay.remove();

sbespalov added a commit to sbespalov/jquery-loading that referenced this issue Oct 31, 2016
@sbespalov
Copy link
Contributor Author

build failed

@sbespalov
Copy link
Contributor Author

@CarlosBonetti
Copy link
Owner

Thanks for the PR! I think the error is caused by a bad grunt configuration... I will take a look as soon as I can

@CarlosBonetti
Copy link
Owner

Travis build is now passing after some dependencies update.

For reference, the overlay can now be destroyed using.

$( selector ).loading('destroy');

Shoud be available at version 1.3.0.

Thanks for the help, @sbespalov !

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

2 participants