结合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', //数据传输格式 ' ...
随机推荐
- Ansible10:Playbook的角色与包含【转】
当单个playbook文件越来越大的时候,我们就需要重新来组织Playbooks了.我们可以将一个大的playbook拆成若干个小的playbook文件,然后通过include的方式,在主配置文件中将 ...
- Nmap的使用【转载】
1.NMap工具 主要功能:探测主机是否在线.扫描主机开放端口和嗅探网络服务,用于网络探测和安全扫描. NMap支持很多扫描技术,例如:UDP.TCPconnect().TCPSYN(半开扫描).ft ...
- PHP的反射机制【转载】
PHP5添加了一项新的功能:Reflection.这个功能使得phper可以reverse-engineer class, interface,function,method and extensio ...
- Linux系统的信号详解
一.信号类型 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) ...
- Git如何删除版本库中的一个提交?
如果不小心增加了一个最新的提交,可以通过以下的操作删除,记住:是删除最新的提交,如果回滚到其他的提交上面,就会导致之后的全部消失. 1.git reset --hard HEAD~1 2.gi ...
- 使WiFi具有保存历史连接的功能
在wpa_supplicant.conf里面添加这个功能 update_config=1 就能更新了,保存了历史的连接AP,不用再输入密码
- 【一题多解】 map 二分 hash trie poj 2503
各种方式解这道题!! 利用map 超时了 #include <iostream> #include <string> #include <map> using na ...
- Interview with Oleg
Interview with Oleg time limit per test 1 second memory limit per test 256 megabytes input standard ...
- OpenGL—Android 开机动画源码分析二
引自http://blog.csdn.net/luoshengyang/article/details/7691321/ BootAnimation类的成员函数的实现比较长,我们分段来阅读: 第三个开 ...
- Zookeeper: configuring on centos7
thispassage is referenced, appreciated. ZooKeeper installation: Download from this site Install java ...