Jquery Toast Plugin如何禁用进度条?

图片描述

如图所示,toast弹框会显示一个进度条,如何在toast插件配置中禁用这个进度条?

Jquery Toast Plugin文档

阅读 3k
2 个回答

相信我,只要这么做。修改下面这个配置

hideAfter: false

图片描述

源代码为证:

canAutoHide: function () {
  return ( this.options.hideAfter !== false ) && !isNaN( parseInt( this.options.hideAfter, 10 ) );
},

processLoader: function () {
  // Show the loader only, if auto-hide is on and loader is demanded
  if (!this.canAutoHide() || this.options.loader === false) {
    return false;
  }
  .......

把这个改成 false 试试

clipboard.png

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题