烤面包机(jQuery)只能显示一次 [英] toastr (jquery) must only show once
本文介绍了烤面包机(jQuery)只能显示一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能帮我限制烤面包机的外观吗?给定的情况是,当我登录系统时,欢迎敬酒者在主屏幕上只会出现一次,直到我注销后才会在整个会话中再次出现.
Can you please help me in limiting the appearance of a toastr. The given situation is that when I log in the system a welcome toastr will appear only once at the home screen and would not appear again in the whole session until I log out.
这是我的烤面包代码
setTimeout(function() {
toastr.options = {
"closeButton": true,
"debug": false,
"progressBar": true,
"positionClass": "toast-top-right",
"onclick": null,
"showDuration": "500",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "linear",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
toastr.success("Welcome Admin", "Smartcomp Solutions Inc.");
},1000);
推荐答案
在选项中使用"preventDuplicates": true,
这篇关于烤面包机(jQuery)只能显示一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文