jquery toast插件

所属分类:UI-工具提示

 77510  383  查看评论 (8)
分享到微信朋友圈
X
jquery toast插件 ie兼容8

Toaster.js

Toaster.js是一款Material Design风格jquery toast插件。Toaster.js提供5种主题,以及众多配置参数,用于显示toast类型的消息提示框。

Toaster.js的特点有:

  • 提供5种主题风格。

  • 可以设置Toast自动消失。

  • 可以显示关闭按钮。

  • 可以显示关闭进度条。

  • 支持从右向左显示。

使用方法

在页面中引入toast.style.css,jquery和toast.script.js文件。

<link href="css/toast.style.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/toast.script.js"></script>

初始化插件

$.Toast()对象需要接收4个参数,分别为:标题、消息、类型和参数。
$.Toast(title, message, type, options);    
title:Toast的标题。
message:Toast的消息体。
type:Toast的类型。
options:配置参数。

默认的配置参数如下:

{
    // append to body
    appendTo: "body",
    // is stackable?
    stack: false,
    // 'toast-top-left'
    // 'toast-top-right'
    // 'toast-top-center'
    // 'toast-bottom-left'
    // 'toast-bottom-right'
    // 'toast-bottom-center'
    position_class: "toast-bottom-right",
    // true = snackbar
    fullscreen: false,
    // width
    width: 250,
    // space between toasts
    spacing: 20,
    // in milliseconds
    timeout: 4000,
    // has close button
    has_close_btn: true,
    // has icon
    has_icon: true,
    // is sticky
    sticky: false,
    // border radius in pixels
    border_radius: 6,
    // has progress bar
    has_progress: false,
    // RTL support
    rtl: false
}


相关插件-工具提示

jQuery网页新功能步骤引导

在网站上经常看到的网页新功能步骤引导
  工具提示
 25703  350

Metro风格的jQuery个性化消息提示插件

介绍一款Metro风格的消息提示框插件,插件是基于jQuery的,不仅拥有Metro哪种简单精巧的UI风格,而且兼容性也还不错。之前分享过一些基于jQuery和CSS3的提示框插件,比如HTML5CSS3弹出提示框,感兴趣的朋友也可以前往关注。
  工具提示
 29230  343

jq 提示插件

封装 jq 提示插件 Confirm ,兼容ie811chrome ff
  工具提示
 47012  407

超漂亮的placeholders提示

超漂亮的placeholders提示
  工具提示
 32497  393

讨论这个项目(8)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    psp 0
    2019/8/15 13:26:12
    不错的插件,可以自定义定位到哪里! 回复
    〓布衣〓 0
    2018/5/15 10:27:37
    关闭的时候 要是弹窗框能自动向下或者向上移动就好了
        神经病0
        2018/6/12 15:43:03
        参数具体怎么填啊 ???
    回复
    只要心情好,程序BUG少。 0
    2018/3/13 10:16:18
    请问这个 type 都有什么类型
        MAX§LPT1
        2019/7/15 13:11:06
        error, info, notice, success, warning
    回复
    ??? 0
    2017/12/26 23:28:17

    貌似引用后与font-awesome冲突啦

        Magic Yang!0
        2017/12/31 13:04:49
        手动改CSS 和JS  换字体就可以了
    回复
    倪燕 0
    2017/10/25 10:33:49
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复