$.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. Redis和Memcached的区别【转】

    如果简单地比较Redis与Memcached的区别,大多数都会得到以下观点:1 Redis不仅仅支持简单的k/v类型的数据,同时还提供list,set,hash等数据结构的存储.2 Redis支持数据 ...

  2. git conflict

    https://wiki.52north.org/bin/view/Documentation/ResolveMergeConflictsInGitEclipse Note that you can ...

  3. ASP.NET中使用Server.Transfer()方法在页间传值 实例

    以下代码在VS2008中测试通过 <%@ Page Language="C#" AutoEventWireup="true" CodeFile=" ...

  4. oracle中的turnc,round,floor,ceil,coalesce函数

    这四个函数有点类似java中的函数,首先是 trunc(number,[decimals]) 这个函数类似截取函数 number:表示你要输入的数 decimals(小数): 表示你要截取的位数[正数 ...

  5. 【dfs 回溯】 zoj 1004

    题意:给出一个源字符串和一个目标字符串,打出所有符合stack操作的i,o串使得对于源字符串的操作能变为目标字符串 思路:搜索,回溯. 之前想过是不是队列,觉得不对那样bfs是求最优解了:也想过用结构 ...

  6. this与super使用总结(java)

    this: Java关键字this只能用于方法方法体内.当一个对象创建后,Java虚拟机(JVM)就会给这个对象分配一个引用自身的指针,这个指针的名字就是this.因此,this只能在类中的非静态方法 ...

  7. Skewed Sorting

    Description Farmer John has 2^N (1 <= N <= 10) cows, each conveniently labeled with paint on h ...

  8. CodeForces 412D Giving Awards

    根据给出的条件建边,然后进行dfs 对于某个点x,当x的后继都遍历完毕后,再输出x节点. 这样能保证所有约束条件. #include<cstdio> #include<cstring ...

  9. Windows Server 2003 下如何安装及配置 FTP 服务器(转)

    Windows Server 2003 下如何安装及配置 FTP 服务器 一.安装 FTP 服务器组件: 写在这里的一点 : 安装及配置 FTP 服务器之前 , 必须先手工配置服务器本身的 IP 地址 ...

  10. nginx配置文件【转载】

    转自 nginx的配置和使用 - chabale的专栏 - 博客频道 - CSDN.NEThttp://blog.csdn.net/chabale/article/details/8954226 #运 ...