[英]how to set timeout on javascript echo
I am using this js for an echo and normally, it disappears after 5 sec. 我正在将此js用于回显,并且通常在5秒钟后消失。 How can i force for this echo to stay for 10 sec?
我如何强制该回声保持10秒钟?
var hulla = new hullabaloo();
hulla.send("File already exists! Do you want to overwrite it?<br /><a class='btn btn-primary' href=''>Yes</a>", "warning");
Try this: 尝试这个:
var hulla = new hullabaloo({ delay: 10000 });
hulla.send("File already exists! Do you want to overwrite it?<br /><a class='btn btn-primary' href=''>Yes</a>", "warning");
The constructor allows you to pass in additional settings, in this case delay
, to change to 10 seconds: 构造函数允许您传入其他设置,在本例中为
delay
,以更改为10秒:
var hulla = new hullabaloo({ delay: 10000 });
More info: https://www.jqueryscript.net/other/Notification-Plugin-Bootstrap-4-Hullabaloo.html 更多信息: https : //www.jqueryscript.net/other/Notification-Plugin-Bootstrap-4-Hullabaloo.html
如果您指的是jQuery插件,则它似乎具有一个相应的选项,可以按如下所示进行设置:
$.hulla.options.delay = 10000
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.