Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toastr JS keep toasts visible indefinitely

I'm attempting to show a toast message using the Toastr plugin from John Papa. (http://codeseven.github.io/toastr/demo.html) I'm having trouble finding an option to have the toasts remain on screen indefinitely without manually setting the "timeOut" and "extendedTimeOut" values to something absurdly high. Does anyone know of a way to do this?

toastr.options = {
    "closeButton": true,
    "timeOut": "500000",
    "extendedTimeOut": "100000"
}
toastr.error('Error!');
like image 571
noclist Avatar asked Mar 14 '16 14:03

noclist


1 Answers

Based on the code, set them to 0

timeOut: 5000, // Set timeOut and extendedTimeout to 0 to make it sticky
like image 200
FrEaKmAn Avatar answered Sep 28 '22 19:09

FrEaKmAn