Closed f3oall closed 4 years ago
closeAll
were implemented in v3.1.0 as closeToasts
. Read docs to learn more.
There is no need for close
method because all methods which show toasts return DOM element, so you can use native remove
to hide it.
PS. Both closeToasts
and native remove
methods don't include hiding animation. Let me know if you need these methods implemented in way when they run animation of hiding.
If anyone is looking to close modal/popup manually
//init the modal
var my_modal = new AWN().modal(
'<b>Custom modal window message</b><br>Class name: `awn-popup-modal-tiny`',
'modal-tiny'
);
//close/delete the modal
my_modal.delete();
Call of
close()
should close toast Call ofcloseAll()
should close all toasts on the screenNow there're only two ways to close toast: click on it and wait for end of duration.
If you think that you need a way to hide toasts programmatically, please vote for this issue. When this feature request will have enough votes, I will implement it.
This issue was firstly mentioned in #14.