Search code examples
javascripttoastr

How to hide notification when new one comes up with toastr


I have notifications popping up in my application, I want when new notification comes, the old one to hide (I don't want two notifications to show at the same time).

How to get that effect with toastr?


Solution

  • You could use the clear function :

    toastr.clear();
    

    Hope this will helps you.

    Source : officiel documentation.