Skip to content

Commit aa1db85

Browse files
martypowellTimFerrell
authored andcommitted
added section for auto hiding (#576)
Thanks for contributing @martypowell !
1 parent 61c48a6 commit aa1db85

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,19 @@ toastr.options.preventDuplicates = true;
183183
```
184184
185185
### Timeouts
186-
Control how toastr interacts with users by setting timeouts appropriately. Timeouts can be disabled by setting them to 0.
186+
Control how toastr interacts with users by setting timeouts appropriately.
187187
```js
188188
toastr.options.timeOut = 30; // How long the toast will display without user interaction
189189
toastr.options.extendedTimeOut = 60; // How long the toast will display after a user hovers over it
190190
```
191191
192+
### Prevent from Auto Hiding
193+
To prevent toastr from closing based on the timeouts, set the `timeOut` and `extendedTimeOut` options to `0`. The toastr will persist until selected.
194+
195+
```js
196+
toastr.options.timeOut = 0;
197+
toastr.options.extendedTimeOut = 0;
198+
```
192199
193200
### Progress Bar
194201
Visually indicate how long before a toast expires.

0 commit comments

Comments
 (0)