jquery 消息提醒插件 toastmessage
最近做系统,想到使用后台要使用消息提醒,但是一直苦恼消息提醒的效果,于是找了一个toastmessage,还不错。记录下使用的方法。
第一步:引入需要的文件
<script type="text/javascript" src="/js/admin/toastmessage/jquery.toastmessage.js"></script>
<link href="/js/admin/toastmessage/css/jquery.toastmessage.css" type="text/css" rel="stylesheet" />
第二步:测试使用的函数
<script>
function showSuccessToast() {
$().toastmessage('showSuccessToast', "Success Dialog which is fading away ...");
}
function showStickySuccessToast() {
$().toastmessage('showToast', {
text : 'Success Dialog which is sticky',
sticky : true,
position : 'top-right',
type : 'success',
closeText: '',
close : function () {
console.log("toast is closed ...");
}
}); }
function showNoticeToast() {
$().toastmessage('showNoticeToast', "Notice Dialog which is fading away ...");
}
function showStickyNoticeToast() {
$().toastmessage('showToast', {
text : 'Notice Dialog which is sticky',
sticky : true,
position : 'top-right',
type : 'notice',
closeText: '',
close : function () {console.log("toast is closed ...");}
});
}
function showWarningToast() {
$().toastmessage('showWarningToast', "Warning Dialog which is fading away ...");
}
function showStickyWarningToast() {
$().toastmessage('showToast', {
text : 'Warning Dialog which is sticky',
sticky : true,
position : 'top-right',
type : 'warning',
closeText: '',
close : function () {
console.log("toast is closed ...");
}
});
}
function showErrorToast() {
$().toastmessage('showErrorToast', "Error Dialog which is fading away ...");
}
function showStickyErrorToast() {
$().toastmessage('showToast', {
text : 'Error Dialog which is sticky',
sticky : true,
position : 'top-right',
type : 'error',
closeText: '',
close : function () {
console.log("toast is closed ...");
}
});
}
</script>
实例网站:
http://akquinet.github.io/jquery-toastmessage-plugin/demo/demo.html
This entry was posted in Javascript and tagged javascript toastmessage 消息提醒
jquery 消息提醒插件 toastmessage的更多相关文章
- Jquery消息提示插件toastr使用详解
toastr是一个基于jQuery简单.漂亮的消息提示插件,使用简单.方便,可以根据设置的超时时间自动消失. 1.使用很简单,首选引入toastr的js.css文件 html <script s ...
- Jquery消息提示插件toastr使用
toastr是一个基于jQuery简单.漂亮的消息提示插件,使用简单.方便,可以根据设置的超时时间自动消失. 相关文件到官网去下载即可 1.引入toastr的js和css文件 <link hre ...
- Jquery消息提示插件toastr
toastr是一个基于jQuery简单.漂亮的消息提示插件,使用简单.方便,可以根据设置的超时时间自动消失. 1.使用很简单,首选引入toastr的js.css文件 <script src=&q ...
- 介绍Web项目中用到的几款JQuery消息提示插件
第一款 noty 官方网站:https://github.com/needim/noty 第二款 artDialog artDialog是一个精巧的web对话框组件,压缩后只有十多KB,并且不依赖其他 ...
- jQuery Growl插件(消息提醒)
ps:菜鸟教程 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <s ...
- jQuery Growl 插件(消息提醒)
jQuery Growl 插件(消息提醒) 允许您很容易地在一个覆盖层显示反馈消息.消息会在一段时间后自动消失,不需要单击"确定"按钮等.用户也可以通过移动鼠标或点击关闭按钮加快隐 ...
- jQuery 消息提示/通知插件
常见消息提醒,类似于Chrome notification,易于使用,用户体验赞. // Simple $.sticky('hi, every body rock!'); // Advantage $ ...
- 基于jQuery消息提示框插件Tipso
今天要分享的这款jQuery消息提示框插件名叫Tipso,它的特点是可以定义提示框的显示位置,以及动态改变提示框的提示内容,应该说是一款相当灵活的jQuery消息提示框插件.效果图如下: 在线预览 ...
- 强大的响应式jQuery消息通知框和信息提示框插件
lobibox是一款功能很强大的jQuery消息通知框和信息提示框插件.这个插件分为两个部分:消息通知框和信息提示框.它能很好的结合Bootstrap使用. 信息提示框 lobibox的信息提示框能够 ...
随机推荐
- SecureCRT的背景和文字颜色的修改
options->;session options->;emulation->;terminal选择linux(相应的服务器系统)ansi color 打上钩options-> ...
- 源码解读—LinkedList
学习了一下linkedList的源码,做下记录. java底层实现的是双向环链表,程序定义了一个header,来保存头结点,header.next指向最后一个节点(最后插入到),header.prev ...
- [HDU 1011] Starship Troopers (树形dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1011 dp[u][i]为以u为根节点的,花了不超过i元钱能够得到的最大价值 因为题目里说要访问子节点必 ...
- Webservice测试从头来
一.写WebService 建立java project 建立数据类包 com.parameters.zz 新建Person类 package com.parameters.zz; public cl ...
- XMLHttpRequest的五步使用方法
<html> <head> <title>Demo</title> <style> body,input,button,select,h1{ ...
- zsh配置文件
zsh通过编辑~/.zshrc来配置环境变量,bash通过编辑~/.bash_profile来做同样的事
- [转]用man查看命令帮助时, 括号中的数字表示的意思
当提及如'rn(1)', 'ctime(3)'时,它们看上去像某种函数调用,但不是. 这些数字表示可在"Unix manual"中的哪一部分找到对应的文档. 数字对应的文档如下: ...
- 150 Opening ASCII mode data connection. FTP连接的PASV和PORT方式
FTP连接服务器时出现 150 Opening ASCII mode data connection.一般是客户端设置PORT 主动方式连接造成的.切换成PASV 被动模式后一般能连接上. 一.什么是 ...
- POJ2376_Cleaning Shifts_C++
题目:http://poj.org/problem?id=2376 英文题强行看不懂,只看的懂输入输出,输入n,m,下接n行每行一个区间两个数左端点 l,有端点 r 给出n个闭区间,求选择最少的区间能 ...
- MyEclipse开发JAX-RS架构WebServices收发JSON数据格式
最近因项目需求,开始学习WebServices. 1.开发环境: MyEclipse2013 2.客户端发送的JSON数据格式为 {persons:[{"name":"a ...