Search code examples
laravel-5toastr

Toastr only display one message at a time


My question is simple, yet still hard to do... I want to be able to only display one (1) message at a time using toastr.js

I have tried the following options already:

"maxOpened": 1,
"limit":1

None of those work and result in this:

result

How can I achieve that when there is a new message, the older one closes and displays the new message?


Solution

  • Try this:

    toastr.options.preventDuplicates = true;