Toastr JS Setting fadeAway value

前端 未结 3 2212
攒了一身酷
攒了一身酷 2020-12-17 09:20

I am using a cool alert js library Project: https://github.com/CodeSeven/toastr

I wanted to fadeOut the following alter after a period of time. Looking at the toast

3条回答
  •  孤城傲影
    2020-12-17 09:22

    You can also pass any options in a parameter. But the parameter must be an object. For your example you can use this:

    toastr.info('Processing...', { fadeAway: 1000 });
    

    PS: also keep in mind that fadeAway is deprecated in the current version (2.0.3).

提交回复
热议问题