1

I can use custom values for showing a toastr. Also, checked-out this question's answers. Toastr JS Setting fadeAway value

But, my question is that is there any way i can override toastr's default options once which will be applicable to my whole project.

for example, I want "timeOut": "2500" to be set for my whole project only mentioning it only once, instead of default "timeOut": "5000".

Community
  • 1
  • 1
kmonsoor
  • 7,600
  • 7
  • 41
  • 55

1 Answers1

0

You can make a small change in the toastr.js file.

Go to: getDefaults() method in toastr.js file. And change the timeOut: 5000, to timeOut: 2500,

Does that make sense?

Mohammad Arman
  • 7,020
  • 2
  • 36
  • 50
  • 1
    yes, it's a hackish way which i am already using. I wanted to know if there's an "API"-ed way. Thanks anyway, mate (y) – kmonsoor Aug 24 '16 at 07:02