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可设定四种通知模式:成功,出错,警告,提示,而提示窗口的位置,动画效果都可以通过能数来设置,在官方站可以通过勾选参数来生成 ...
随机推荐
- 关于Hibernate的关联映射
何为关联映射 由于数据库的表与表之间存在的管理关系,可以分为一对一,一对多和多对多关联,一般情况下,在数据库设计中是通过表的外键来建立各种关系的,在Hibernate中则把数据库表与表之间的关系数据映 ...
- Google earth
装了Google earth之后,需要联网,才能放缩看不同精细程度的场景,除非你之前看过,在你自己的缓存中有存储. Google earth有自己的server,我们交互化的时候,server传数据给 ...
- Mysql之取消主从复制
Mysql5.7 Mysql取消主从复制很简单.只需在其要终止同步的Server上[一般是Slave]执行下面语句即可: stop slave; reset slave; 如图: .
- ios框架
iPhone OS(现在叫iOS)是iPhone, iPod touch 和 iPad 设备的操作系统. 1,Core OS: 是用FreeBSD和Mach所改写的Darwin, 是开源 ...
- 使用Gson送解析Json格式
Java bean: package com.jingle.a; public class Person { public String name; public int age; public Pe ...
- 继承下public,protected,private访问权限
C++中派生类对基类成员的访问形式主要有以下两种: 1.内部访问:由派生类中新增成员对基类继承来的成员的访问. 2.对象访问:在派生类外部,通过派生类的对象对从基类继承来的成员的访问.今天给大家介绍在 ...
- Qt中如何添加.qrc文件
You need a resource file (.qrc) within which you embed the input text file. The input file can be an ...
- EventBus学习入门
EventBus Features What makes greenrobot's EventBus unique, are its features: Simple yet powerful: Ev ...
- java的final用法
转自:http://blog.163.com/maomaoyu_1012/blog/static/19060130520116269329894/ 1. 修饰基础数据成员的final ...
- 为 ASP.NET Web API 创建帮助页面(转载)
转载地址:http://www.asp.net/web-api/overview/creating-web-apis/creating-api-help-pages 当创建web API 时,经常要创 ...