templets/cnc/jsa/QuickBox.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
*
* QuickBox (Another Lightbox clone)
*
* Version: 1.0
* Documentation: AndrewPlummer.com (http://www.andrewplummer.com/code/quickbox/)
* Heavily inspired by: Slimbox by Christophe Beyls (http://www.digitalia.be)
* Written for: Mootools 1.2
* License: MIT-style License
*
* Copyright (c) 2008 Andrew Plummer
*
*
*/
var QuickBox = new Class({
Implements: Options,
options: {
resizeDuration: 600,
resizeTransition: Fx.Transitions.Circ.easeOut,
initialWidth: 250,
initialHeight: 250,
padding: 10,
animateCaption: true,
counter: "Image {NUM} of {TOTAL}"
},
initialize: function(options){
this.setOptions(options);
this.anchors = $$("a[rel=quickbox]");
this.anchors.each(function(a){
a.store("caption", a.get("title") || a.getElement("img").get("alt"));
a.addEvent("click", this.open.bindWithEvent(this, a));
}, this);
this.overlay = new Element("div", {
id: "qbOverlay",
events: {
click: this.close.bindWithEvent(this)
}
}).inject(document.body, "top");
this.quickBox = new Element("div", {
id: "qbBox",
styles: {
width: this.options.initialWidth,
height: this.options.initialHeight,
marginLeft: -(this.options.initialWidth/2),
position: "absolute"
}
}).inject(document.body, "top");
this.prevLink = new Element("a", {id: "qbPrev", href: "#"}).inject(this.quickBox);
后面还有 185 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。