I want to be able to destroy a YUI Panel when the user clicks the close button.
I have tried using hideEvent but that does not work. I’m assuming since the object is still active and therefore cannot be destroyed:
panel.hideEvent.subscribe(function(o) {
panel.destroy();
});
Is there a way I can destroy the Panel when a user clicks close? The close button is not assigned an ID although it is assigned a class:
<a class="container-close" href="#">Close</a>
Ending up having to use the setTimeout() function: