显示toastr消息3秒钟 [英] show toastr message for 3 seconds

查看:589
本文介绍了显示toastr消息3秒钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用toastr,但弹出窗口仍然不会持续1秒钟然后消失,如何显示消息一段时间3秒?谢谢你:



Hi,

I am using toastr, but the popup stays not even for 1 second and dissapear then, how to show the message for a period for 3 seconds? THank you:

$(document).ready(function () {
           toastr.options = {
               "closeButton": false,
               "debug": false,
               "positionClass": "toast-bottom-full-width",
               "onclick": null,
               "showDuration": "300000",
               "hideDuration": "1000",
               "timeOut": "8000",
               "extendedTimeOut": "1000",
               "showEasing": "swing",
               "hideEasing": "linear",
               "showMethod": "fadeIn",
               "hideMethod": "fadeOut"
           };
           $('#toastr-success').click(function () {
               toastr.success('This is a success notification from toastr.')
           });

           $('#toastr-info').click(function () {
               toastr.info('This is an information notification provided by toastr.')
           });

           $('#toastr-warning').click(function () {
               toastr.warning('This is a warning notification provided by toastr.')
           });

           $('#toastr-error').click(function () {
               toastr.error('This is an error notification provided by toastr.')
           });
       });

推荐答案

(document).ready(function(){
toastr.options = {
closeButton false
debug false
positionClass toast-bottom-full-width
onclick null
< span class =code-string> showDuration: 300000
hideDuration 1000
timeOut 8000
extendedTimeOut 1000
showEasing swing
hideEasing linear
showMethod fadeIn
hideMethod fadeOut
};
(document).ready(function () { toastr.options = { "closeButton": false, "debug": false, "positionClass": "toast-bottom-full-width", "onclick": null, "showDuration": "300000", "hideDuration": "1000", "timeOut": "8000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" };


' #toastr-success')。click(function(){
toastr.success(' 这是来自toastr的成功通知。'
});
('#toastr-success').click(function () { toastr.success('This is a success notification from toastr.') });


' #toastr-info')。click(function(){
toastr.info('' 这是由toastr。提供的信息通知。'
});
('#toastr-info').click(function () { toastr.info('This is an information notification provided by toastr.') });


这篇关于显示toastr消息3秒钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆