结合Pnotify插件--app-jquery-notify.js
$.NOTIFY =
{
showSuccess : function (title, text, context)
{
var opt =
{
title : title,
text : text,
type : 'success',
hide : true,
delay : 1500
};
if (context != undefined && context != null)
{
$.NOTIFY.show_context (context, false, opt);
return;
}
new PNotify (opt);
},
showNotice : function (title, text, context)
{
var opt =
{
title : title,
text : text,
type : 'notice',
hide : true,
delay : 1500
};
if (context != undefined && context != null)
{
$.NOTIFY.show_context (context, false, opt);
return;
}
new PNotify (opt);
},
showError : function (title, text, context)
{
var opt =
{
title : title,
text : text,
type : 'error',
hide : true,
delay : 1500
};
if (context != undefined && context != null)
{
$.NOTIFY.show_context (context, false, opt);
return;
}
new PNotify (opt);
},
showLogin : function (context)
{
var opt =
{
title : "信息",
text : "您可能已经离线,请重新刷新网页后再试!",
type : "info",
confirm :
{
confirm : true,
buttons : [
{
text : '刷新网页',
click : function (notice)
{
top.location.reload ();
}
}
]
},
buttons :
{
closer : false,
sticker : false
}
};
if (context != undefined && context != null)
{
$.NOTIFY.show_context (context, false, opt);
return;
}
new PNotify (opt)
},
showConfirm : function (title, text, buttons, context)
{
var opt =
{
title : title,
text : text,
type : "notice",
confirm :
{
confirm : true,
buttons : buttons
},
buttons :
{
closer : false,
sticker : false
}
}; if (context != undefined && context != null)
{
$.NOTIFY.show_context (context, false, opt);
return;
} new PNotify (opt); },
show_context : function (context, modal, opt)
{
var opts = $.extend (
{
"push" : "top",
"dir1" : "down",
"dir2" : "left",
"context" : context,
"modal" : modal,
"overlay_close" : true,
"addclass" : "stack-modal"
}, opt)
new PNotify (opts);
}
}
结合Pnotify插件--app-jquery-notify.js的更多相关文章
- jQuery Validate 表单验证插件----利用jquery.metadata.js将校验规则直接写在class属性里面并定义错误信息的提示
一.下载依赖包 网盘下载:https://yunpan.cn/cryvgGGAQ3DSW 访问密码 f224 二. 添加一个另外一个插件jquery.metadata.js 并把校验规则写在控件里面 ...
- 表单验证插件之jquery.validate.js
提到表单验证的插件,第一个想到的就是jquery.validate.js,所以小生想在这里稍微详细地说一下这款插件的具体使用方法,便于理解,我直接附上整段demo的代码(没怎么调样式,主要是看js): ...
- 瀑布流插件(jquery.masonry.js)
什么是瀑布流?去看看Pinterest(这才是鼻祖),Mark之,蘑菇街,点点网,还有腾讯的微博广场吧.随着页面滚动条向下滚动,还会不断加载数据块并附加至当前尾部. Masonry是一款很好用的jqu ...
- 【jq】插件—缓存jquery.cookie.js
jquery.cookie.js插件 轻量级cookie管理 1°下载地址:http://plugins.jquery.com/cookie/ 2°引入方式:(基于jquery) <scri ...
- 生成二维码的 jQuery 插件:jquery.qrcode.js的中文乱码问题
在使用jquery.qrcode.js这个插件生成二维码的时候发现并不能识别中文. 原因在于:jquery-qrcode是采用charCodeAt()方式进行编码转 换的. 而这个方法默认会获取它的U ...
- JQuery插件之Jquery.datatables.js用法及api
1.DataTables的默认配置 $(document).ready(function() { $('#example').dataTable(); } ); 示例:http://www.guoxk ...
- Js 之生成二维码插件(jquery.qrcode.js)
一.下载 链接:https://pan.baidu.com/s/1cMjaCYQ_buZNT5XRRjuNTA提取码:myqm 二.效果图 三.代码 <!DOCTYPE html> < ...
- Js 之cookie插件(jquery.cookie.js)
一.代码 (function (factory) { if (typeof define === 'function' && define.amd) { // AMD define([ ...
- 前端 时间个性化 插件 jquery.timeago.js
关键词 : 时间格式化 刚刚 N分钟前 N小时前 N天前 N月前 N年前 MM-dd hh:mm 或者 yyyy-MM-dd 前端: <span class="time" ...
- 【PC端】jQuery+PHP实现浏览更多内容(jquery.more.js插件)
参数说明: 'amount' : '10', //每次显示记录数 'address' : 'comments.php', //请求后台的地址 'format' : 'json', //数据传输格式 ' ...
随机推荐
- isPostBack原理
从 到输入用户名,点击提交按钮 这个过程就叫做postback(是两个不同的状态) 利用ispostback原理,实现是否第一次进入处理程序(上一个用用户名判断的不好,会导致在用户名空的情况下 ...
- Qt学习之系列[9] – QCoreApplication:processEvents()可能会引起递归,导致栈溢出崩溃
api含义:QCoreApplication::processEvents() 将处理所有事件队列中的事件并返回给调用者. 问题描述: 当主线程在某个槽函数里正在执行processEvents时, 刚 ...
- 今天修改 wifi hal 的时候碰见一个问题
今天修改 supplicant_name的时候出现一个问题. 发现原来init.wifi.rc 的server的时候出现了一个问题. 名字不对,没有和 supplicant_name对应起来. 所以就 ...
- typeof判断类型(数组类型得用instanceof)
var a= 1; console.log(typeof a); var b= '1'; console.log(typeof b); var c; console.log(typeof c); va ...
- C# API 大全
C:\ProgramFiles\MicrosoftVisual Studio .NET\ FrameworkSDK\Samples\ Technologies\ Interop\PlatformInv ...
- C#生成DLL文件
使用csc命令将.cs文件编译成.dll的过程 很多时候,我们需要将.cs文件单独编译成.dll文件, 操作如下: 打开命令窗口->输入cmd到控制台->cd C:\WINDOWS\Mic ...
- 1988: Sn 爆long long 的处理方法
题目描述 给你两个数 n, p(0 < n,p <= 10^15); a1 = 1; a2 = 1+2; a3 = 1+2+3; ... an = 1+2+3+...+n Sn ...
- Singleton ——运行时全局唯一对象
Singleton 运行时全局唯一对象 Singleton模式只解决一个问题,如何做到运行时创建一个全局唯一的对象? 1:隐藏类的实例化操作,即将构造函数声明为private或protected.任何 ...
- HDU 1532 Drainage Ditches (最大网络流)
Drainage Ditches Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) To ...
- php csv操作
csv的写入数据: $data = array( array('qq号','登录时间','名称'), array('123456','2012-08-21 15:21:10'.chr(1),'我是来测 ...