jquery toastr introduction
1.资源
http://www.jq22.com/jquery-info476
Nuget
Install-Package toastr
官网 http://codeseven.github.io/toastr/
2.简单使用步骤
Link to toastr.css
<link href="toastr.css" rel="stylesheet"/>
Link to toastr.js
<script src="toastr.js"></script>
use toastr to display a toast for info, success, warning or error
// Display an info toast with no title
toastr.info('Are you the 6 fingered man?')
3.BundleConfig
bundles.Add(new ScriptBundle("~/bundles/jquery")
.Include("~/Scripts/jquery-{version}.js", "~/Scripts/toastr.min.js")
);
bundles.Add(new StyleBundle("~/Content/css")
.Include("~/Content/bootstrap.css", "~/Content/site.css")
.Include("~/Content/toastr.min.css"));
4.abp集成
var abp = abp || {};
(function () {
if (!toastr) {
return;
}
/* DEFAULTS *************************************************/
toastr.options.positionClass = 'toast-bottom-right';
/* NOTIFICATION *********************************************/
var showNotification = function (type, message, title, options) {
toastr[type](message, title, options);
};
abp.notify.success = function (message, title, options) {
showNotification('success', message, title, options);
};
abp.notify.info = function (message, title, options) {
showNotification('info', message, title, options);
};
abp.notify.warn = function (message, title, options) {
showNotification('warning', message, title, options);
};
abp.notify.error = function (message, title, options) {
showNotification('error', message, title, options);
};
})();
jquery toastr introduction的更多相关文章
- jquery toastr弹窗的代码和使用
<link href="toastr.css" rel="stylesheet" type="text/css" /> < ...
- jQuery toastr提示简单实现
注:在学校平时做的小项目跳页都是用 Response.Write写脚本弹窗并跳页,每次点击登录成功,注册成功......然后点击确定,太麻烦了,这次的项目老师说让用这个插件,所以就简单搞了一下! 实现 ...
- Jquery toastr提示框
toastr是一个基于JQuery的消息提示插件; 1. 下载toastr和jquery https://jquery.com/download/ https://codeseven.github.i ...
- toastr 通知提示插件
table.sb-tb td,table.sb-tb th { padding: 5px 10px !important } jquery toastr 一款轻量级的通知提示框插件. 网页开发中经常会 ...
- 前端基础(七):Toastr(弹出框)
Toastr 简介 jquery toastr 一款轻量级的通知提示框插件. 网页开发中经常会用到提示框,自带的alert样式无法调整,用户体验差. 所以一般通过自定义提示框来实现弹窗提示信息,而jq ...
- WebGrid Helper with Check All Checkboxes
WebGrid Helper with Check All Checkboxes myEvernote Link Tuesday, September 13, 2011ASP.NET ASP.NET ...
- [Django 1.5] Django 开发学习资源链接
jQuery : jQuery API introduction:http://api.jquery.com/ jQuery plugins: http://benalman.com/projects ...
- bootstrap table记录一下
$(function() { // 刷新 talbe function refresh() { $("#table").bootstrapTable('refresh'); } $ ...
- 漂亮灵活设置的jquery通知提示插件toastr
toastr是一款非常棒的基于jquery库的非阻塞通知提示插件,toastr可设定四种通知模式:成功,出错,警告,提示,而提示窗口的位置,动画效果都可以通过能数来设置,在官方站可以通过勾选参数来生成 ...
随机推荐
- CSS命名法
一.Css命名法: 1.驼峰命名法:除第一个单词的首字母小写之外,其余的单词首字母均大写.如:#headBlock(2). 2.帕斯卡命名法:所有单词的首字母均大写.如:#HeadBlock(3). ...
- MAC下GitHub命令操作
由于GitHub实在太有用了~~ ,各种源代码,开源工程,经常需要下载下来使用和学习,或者自己的代码需要上传之类的,尽管有"GitHub for Mac"工具,但是作为一名程序猿! ...
- No space left on device you must specify the filesystem type--Linux重启挂在失败
在Linux中拷贝了一个文件比较大5G,直接提示:No SPace Left On Device,很明显是磁盘空间不够了,我因为是在虚拟机上面建的,直接右击虚拟机==>编辑设置 如图片1所示, ...
- Java遍历List的时候删除item
参考:http://blog.csdn.net/longyulu/article/details/8315068 在Java中有时候我们会需要对List里面的符合某种业务的数据进行删除,但是如果不了解 ...
- 浅析 - Storyboard / Xib
大家都知道纯代码写应用的成本是很高的,特别是涉及到UI界面的实现,相当耗费时间.之前自己写应用时有了解过Storyboard,也简单使用过,但随着最近深入了解它之后,发现自己低估了它的作用和影响力,因 ...
- 三、jQuery--jQuery基础--jQuery基础课程--第4章 jQuery表单选择器
1.:input表单选择器 如何获取表单全部元素?:input表单选择器可以实现,它的功能是返回全部的表单元素,不仅包括所有<input>标记的表单元素,而且还包括<textarea ...
- 重温WCF之会话Session(九)
转载地址:http://blog.csdn.net/tcjiaan/article/details/8281782 每个客户端在服务器上都有其的独立数据存储区,互不相干,就好像A和服务器在单独谈话一样 ...
- Pyqt 中__init__(self,parent==None) parent理解
参考: 在PyQt中,所有class都是从QObject派生而来,QWidget对象就可以有一个parent.这种parent-child关系主要用于两个方面: 没有parent的QWidget类被认 ...
- scala中的抽象类
scala中也有和java,c#类似的抽象类,抽象类会有部分实现,也有没有实现的方法定义.抽象类最大的特征是不能直接实例化.下面我们看个例子. abstract class Animal { def ...
- Windows环境下Oracle数据库的自动备份脚本
批处理文件(.bat) @echo off echo ================================================ echo Windows环境下Oracle数据 ...