flipdown
flipdown copied to clipboard
Tearing down the javascript
Hi, what's the best way to tear down a flipdown instance? I don't see a function that does so.
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.