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的信息提示框能够 ...
随机推荐
- String相关操作
1.求字符串中连续出现最多的字串 pair<string, int> substring(const string& str) { ; string substr; vector& ...
- How to Release the Temp LOB Space and Avoid Hitting ORA-1652 (文档 ID 802897.1)
APPLIES TO: Oracle Database - Enterprise Edition - Version 8.1.5.0 and laterInformation in this docu ...
- 一个JS定时器类
学习js,因为函数和定时器直接的关系是非绑定的.我不能说我开启一个定时,然后拿一个变量去记录这个setInterval的返回值,这样很麻烦. 本着面向对象的思想,利用业余时间(周末在家里)写了一个类, ...
- android softinput 相关
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN | WindowManager.Layo ...
- STL之vetor 排序
1 STL提供的Sort 算法 C++之所以得到这么多人的喜欢,是因为它既具有面向对象的概念,又保持了C语言高效的特点.STL 排序算法同样需要保持高效.因此,对于不同的需求,STL提供的不同的函数, ...
- opecv轮廓匹配,可以用于去噪
一个跟轮廓相关的最常用到的功能是匹配两个轮廓.如果有两个轮廓,如何比较它们;或者如何比较一个轮廓和另一个抽象模板. 矩 比较两个轮廓最简洁的方式是比较他们的轮廓矩.这里先简短介绍一个矩的含义.简单的说 ...
- 查询数据库中表或视图或存储过程的数量 sql 语句
如果一个数据库中表的数量较多的话,那么在统计数据库中表的数量或视图或存储过程的数量时,如果还有一个一个去数,那就太麻烦了,其实可以通过 sql 语句来查询的,sql 语句的查询方法如下: sql se ...
- 简单JS实现对表的行的增删
这段代码非常的简单,仅仅作为自己的一个小小的记录! ok,先上一个简单的图例,效果如下(注意:这只是一个简单的例子,不过可以根据这个简单的例子,变化出更为复杂的效果)! 代码也非常的简单,如下所示(注 ...
- c# 将页面导出到word(含图片及控件)
/// <summary> /// 创建word /// <param name="filePath">文件路径 </param> /// &l ...
- 再论prototype
前段时间曾经写过一篇关于prototype原型的文章(http://www.cnblogs.com/ttcc/p/3751604.html),但是对于JS的核心之一,还是应该多多熟悉才行,常回过头来看 ...