-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 a pJS object? #63
Comments
HI @cnjsstong2, You can destroy the pJS by this way : window.pJSDom[0].pJS.fn.vendors.destroypJS() |
@VincentGarreau Thanks! |
If you're in a singe page application and might want to start rendering again (fresh) you have to re-initialize the window.pJSDom array again since .destroypJS removes it completely. Safest way for me is :
|
In my case, as I'm only using one particle.js object and I'm sure I'll be using only one, I edited @maxfriedmann code to
|
This needs to be in the README |
Seems like |
Wtf is pjsDOM??? there is no mention of it in the readme.md |
In IE, it will continue to call raf even after the DOM destroyed. Is there any way to manually destroy a pJS object?
The text was updated successfully, but these errors were encountered: