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

Tearing down the javascript #40

Open
ykamin-booth opened this issue Nov 30, 2021 · 1 comment
Open

Tearing down the javascript #40

ykamin-booth opened this issue Nov 30, 2021 · 1 comment

Comments

@ykamin-booth
Copy link

Hi, what's the best way to tear down a flipdown instance? I don't see a function that does so.

@PButcher
Copy link
Owner

PButcher commented Oct 25, 2022

For anyone looking for this in future, here's how you can do it.

// Clear FlipDown's internal interval
clearInterval(flipdown.countdown);
// Remove all generated elements inside the FlipDown container
document.getElementById("flipdown").replaceChildren();

After doing this, you can construct a new instance of FlipDown.

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