$.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. replication factor

    http://www.tuicool.com/articles/RJbIBj 关于Hadoop中replication factor解惑 时间 2014-06-09 08:00:50   ITeye ...

  2. openCV(四)---Canny边缘检测

    图像的边缘检测的原理是检测出图像中所有灰度值变化较大的点,而且这些点连接起来就构成了若干线条,这些线条就可以称为图像的边缘. 直接上代码,函数简介都在代码注释中 //canny边缘检测 -(void) ...

  3. openCV(二)---iOS中使用openCV的图片格式转换

    可以实现将UIImage和IplImage类型实现相互转换 //由于OpenCV主要针对的是计算机视觉方面的处理,因此在函数库中,最重要的结构体是IplImage结构. - (IplImage *)C ...

  4. Java-List泛型的用处(能够使用传入泛型对象的方法)

    List<PageData> varList = setMealService.list(page); for(int i = 0;i < varList.size(); i++){ ...

  5. 【转】Xshell 十个技巧

    原文:http://www.cnblogs.com/wanhl/archive/2012/10/17/2727607.html 一.帐号密码保存.可以保存多个vps登陆信息,免去每次输入的烦恼. 二. ...

  6. 包(package)

    防止文件重名,包体现在文件夹上.包必须建立文件夹. 类名的全称是:包名.类名 javac   xx.java 命令编译的时候,不会建立对应的文件夹, 建立包对应的文件夹的命令,要用 javac -d ...

  7. Qt 5.5 tr usage

    in .cpp file, wherever you want, wrap QString with a tr("somesz") rendering it ready to be ...

  8. liunx 平台下软件包管理

    RPM/DPKG 两大阵营简介 在 GNU/Linux( 以下简称 Linux) 操作系统中,RPM 和 DPKG 为最常见的两类软件包管理工具,他们分别应用于基于 RPM 软件包的 Linux 发行 ...

  9. linux 下载安装tomcat

    1.下载tomcat 2.tar -zxvf apache-tomcat-7.0.67.tar.gz 3.cd bin目录  启动  ./startup.sh [root@fuyuanming bin ...

  10. Android图片处理神器BitmapFun源码分析

    作为一名Android开发人员,相信大家对图片OOM的问题已经耳熟能详了,关于图片缓存和解决OOM的开源项目也是相当的多,被大家熟知的就是Universal_image_loader和Volley了, ...