SB2*_*055 46 notifications messages mouseover sticky toastr
我一直在玩toastr并且已经成功地将超时设置为0,因此吐司仍然是粘性的,但是当我将鼠标移出吐司时吐司消失了.我想要覆盖它,所以如果用户点击它,烤面包就会消失 - 非常适合有大量文字的祝酒词.如何才能做到这一点?
ryn*_*nop 16
timeOut并且extendedTimeOut必须设置为0.
这是一个完整的例子:
toastr.options = {
timeOut: 0,
extendedTimeOut: 0
};
toastr.info("Testing <button>blah</button>");
Run Code Online (Sandbox Code Playgroud)
对于那些不想在点击时关闭吐司的人,示例更改为:
toastr.options = {
timeOut: 0,
extendedTimeOut: 0,
tapToDismiss: false
};
toastr.info("Testing <button>blah</button>");
Run Code Online (Sandbox Code Playgroud)