阻塞和不阻塞提示框(toastr)

【toastr弹窗使用帮助】
官方demo地址 https://codeseven.github.io/toastr/demo.html

使用方法:(不阻塞提示框)
1.把bulid下的css 和js 文件引入(引入时放在jquery之后,插件依赖jquery);
2.toastr[“success”](content,title,{“closeButton”: true, positionClass: “toast-bottom-right”, onShown: function(){$("#alarmSound")[0].play();}, timeOut: 0});

========================================================
简单调用示例
1.toastr"warning"; 或 toastr"success";
2.toastr.info(“内容”, “标题”); 或 toastr.error(“内容”);
3.toastr[“success”](“标题”, “内容”, {属性名称:属性值}); 或 toastr.info(“内容”, “标题”, {属性名称:属性值});
4.toastr的全局配置,以第3条中方式进行复写的话则为局部重写。
toastr.options = {
“closeButton”: true, // 是否带关闭按钮
“debug”: false, // 是否为调试模式
“newestOnTop”: false, // 新弹窗是否追加在旧弹窗上方
“progressBar”: false, // 是否显示进度条
“positionClass”: “toast-top-right”, // 弹窗显示的位置,可选{toast-top-left,toast-top-right,toast-top-center,toast-top-full-width,toast-botton-right,toast-bottom-left,toast-bottom-center,toast-bottom-full-width}
“preventDuplicates”: true, // 弹窗同时只显示一个,当前弹窗消失后才出现下一个弹窗
“onclick”: null, // 点击弹窗自定义事件
“showDuration”: “300”, // 显示动作时间
“hideDuration”: “1000”, // 隐藏动作时间
“timeOut”: “5000”, // 自动关闭超时时间
“extendedTimeOut”: “1000”,
“showEasing”: “swing”, // 显示缓动函数,swing变速运动 linear匀速运动
“hideEasing”: “linear”, // 隐藏缓动函数,swing变速运动 linear匀速运动
“showMethod”: “fadeIn”, // 显示方式,与jquery相同
“hideMethod”: “fadeOut”, // 隐藏方式,与jquery相同
“onShown”: function(){}, // 在弹窗显示时触发的方法
“onHidden”: function(){} // 弹窗消失时触发的方法
}
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值