$.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的更多相关文章

  1. jQuery Validate 表单验证插件----利用jquery.metadata.js将校验规则直接写在class属性里面并定义错误信息的提示

    一.下载依赖包 网盘下载:https://yunpan.cn/cryvgGGAQ3DSW  访问密码 f224 二. 添加一个另外一个插件jquery.metadata.js 并把校验规则写在控件里面 ...

  2. 表单验证插件之jquery.validate.js

    提到表单验证的插件,第一个想到的就是jquery.validate.js,所以小生想在这里稍微详细地说一下这款插件的具体使用方法,便于理解,我直接附上整段demo的代码(没怎么调样式,主要是看js): ...

  3. 瀑布流插件(jquery.masonry.js)

    什么是瀑布流?去看看Pinterest(这才是鼻祖),Mark之,蘑菇街,点点网,还有腾讯的微博广场吧.随着页面滚动条向下滚动,还会不断加载数据块并附加至当前尾部. Masonry是一款很好用的jqu ...

  4. 【jq】插件—缓存jquery.cookie.js

    jquery.cookie.js插件   轻量级cookie管理 1°下载地址:http://plugins.jquery.com/cookie/ 2°引入方式:(基于jquery) <scri ...

  5. 生成二维码的 jQuery 插件:jquery.qrcode.js的中文乱码问题

    在使用jquery.qrcode.js这个插件生成二维码的时候发现并不能识别中文. 原因在于:jquery-qrcode是采用charCodeAt()方式进行编码转 换的. 而这个方法默认会获取它的U ...

  6. JQuery插件之Jquery.datatables.js用法及api

    1.DataTables的默认配置 $(document).ready(function() { $('#example').dataTable(); } ); 示例:http://www.guoxk ...

  7. Js 之生成二维码插件(jquery.qrcode.js)

    一.下载 链接:https://pan.baidu.com/s/1cMjaCYQ_buZNT5XRRjuNTA提取码:myqm 二.效果图 三.代码 <!DOCTYPE html> < ...

  8. Js 之cookie插件(jquery.cookie.js)

    一.代码 (function (factory) { if (typeof define === 'function' && define.amd) { // AMD define([ ...

  9. 前端 时间个性化 插件 jquery.timeago.js

    关键词 : 时间格式化 刚刚 N分钟前 N小时前 N天前 N月前 N年前 MM-dd hh:mm  或者  yyyy-MM-dd 前端: <span class="time" ...

  10. 【PC端】jQuery+PHP实现浏览更多内容(jquery.more.js插件)

    参数说明: 'amount' : '10', //每次显示记录数 'address' : 'comments.php', //请求后台的地址 'format' : 'json', //数据传输格式 ' ...

随机推荐

  1. 数据库连接池c3p0的设置

    spring-hibernate.xml配置 <?xml version="1.0" encoding="UTF-8"?> <beans xm ...

  2. WinForm 子窗体在父窗体范围内移动,不能出父窗体 摘自于网络

    详细解释:1, 主窗体Form1属性IsMdiContainer设为True,并添加ToolStrip控件, Toolstrip中添加一个按钮toolStripButton1.         2,添 ...

  3. 后台运行之BackgroundWorker

    BackgroundWorker 类允许您在单独的专用线程上运行操作. 耗时的操作(如下载和数据库事务)在长时间运行时可能会导致用户界面 (UI) 似乎处于停止响应状态. 如果您需要能进行响应的用户界 ...

  4. Learning Java characteristics (Java in a Nutshell 6th)

    Java characteristics: Java .class files are machine-independent, including the endianness. Java .cla ...

  5. CDockablepane风格设置

    屏蔽掉pane右上角的几个按钮 即将CDockablePane右上角的三个按钮屏蔽. 1            去掉关闭按钮 在CDockablePane的派生类中,重写方法CanBeClosed即可 ...

  6. HDU 5323 DFS

    DFS Time Limit : 5000/2000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submissio ...

  7. CentOS添加字体

    到Windows XP或者Vista下复制字体到CentOS 1.到Windows XP或者Vista下复制字体到CentOS 雅黑:msyh 黑体:SimHei 宋体:SimSun 华文细黑:STX ...

  8. Codeforces Round #363 (Div. 2)D. Fix a Tree(并查集)

    D. Fix a Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...

  9. HBase伪分布安装

    1把hbase-0.94.2-security.tar.gz复制到/usr/local 2 解压缩.重命名.设置环境变量 cd /usr/local tar -zxvf hbase--security ...

  10. Kth order statistcs

    Selection: selection is a trivial problem if the input numbers are sorted. If we use a sorting algor ...