public/static/admin/js/jquery.purebox.js
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* jQuery弹出层插件,简单精致,结构简单,样式简洁,接口丰富,满足轻量应用
* email: tianshaojie@msn.com
* date: 2013-01-15
* version: 1.0.0
*/
(function($) {
var
$doc = $(document),
$win = $(window),
ie = /msie/.test(navigator.userAgent.toLowerCase()),
ie6 = ('undefined' == typeof(document.body.style.maxHeight)),
max = Math.max,
min = Math.min,
purebox = function(options) {
return purebox.list[options.id] ? purebox.list[options.id] : new purebox.fn._init(options);
};
purebox.fn = purebox.prototype = {
constructor : purebox,
_init : function(options) {
var opts = $.extend({}, purebox.defaults, options || {}),
template = ['<div id="',opts.id,'" class="pb"><div class="cboxContent">',
opts.head ? ('<div class="pb-hd">' + (opts.xBtn ? '<a class="pb-x">\u2715</a>' : '') + '<span class="pb-title">'+opts.title+'</span></div>') : '',
'<div class="pb-bd"><div class="pb-ct"></div>',
opts.foot ? ('<div class="pb-ft">'+(opts.cBtn ? '<a class="pb-btn pb-ok">' + opts.ok_title + '</a>' : '') + (opts.cl_cBtn ? '<a class="pb-btn pb-cl">' + opts.cl_title + '</a>' : '') + '</div>') : '',
'</div></div></div>'].join(''),
$pb = $(template),
$head = $pb.find('.pb-hd'),
$foot = $pb.find('.pb-ft'),
that = this;
that.$pb = $pb,
that.$head = $head;
that.$foot = $foot;
that.$xBtn = $head.find('.pb-x');
that.$cont = $pb.find('.pb-ct');
that.$cBtn = $foot.find('.pb-cl');
that.$oBtn = $foot.find('.pb-ok');
that.$pb.appendTo(document.body);
that.opts = opts;
that.offsetHeight = $head.outerHeight()+$foot.outerHeight();
that._bindEvent();
that._setPbZindex();
that.resize(opts.width, opts.height);
that.setContent(opts.content);
opts.drag && that._setDrag();
opts.mask && that._setMask();
opts.resize && that.$pb.resizable({
handles: "e, s, se",
onResize:function() {
that.$cont.height(that.$pb.innerHeight() - that.offsetHeight);
},
onStopResize:function() {
that.$cont.height(that.$pb.innerHeight() - that.offsetHeight);
}
});
!opts.fixed && that.$pb.css('position','absolute');
that.setPos(opts.top, opts.left);
后面还有 269 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
