【问题标题】:Toastr JS keep toasts visible indefinitelyToastr JS 让 toast 无限期可见
【发布时间】:2016-06-29 15:29:38
【问题描述】:

我正在尝试使用 John Papa 的 Toastr 插件显示敬酒消息。 (http://codeseven.github.io/toastr/demo.html) 我很难找到一个选项让敬酒无限期地保留在屏幕上,而无需手动将“timeOut”和“extendedTimeOut”值设置为高得离谱的值。有谁知道这样做的方法吗?

toastr.options = {
    "closeButton": true,
    "timeOut": "500000",
    "extendedTimeOut": "100000"
}
toastr.error('Error!');

【问题讨论】:

    标签: javascript toastr


    【解决方案1】:

    基于code,设置为0

    timeOut: 5000, // Set timeOut and extendedTimeout to 0 to make it sticky
    

    【讨论】:

    • 此外,我还必须设置 "extendedTimeOut": 0。
    猜你喜欢
    • 2020-06-02
    • 1970-01-01
    • 2020-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-28
    • 1970-01-01
    • 2018-12-30
    相关资源
    最近更新 更多