src/main/resources/static/home/raty/js/jquery.raty.min.js
(开头部分) 14KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* jQuery Raty - A Star Rating Plugin
*
* Licensed under The MIT License
*
* @version 2.5.2
* @author Washington Botelho
* @documentation wbotelhos.com/raty
*
*/
;(function (b) {
var a = {
init: function (c) {
return this.each(function () {
a.destroy.call(this);
this.opt = b.extend(true, {}, b.fn.raty.defaults, c);
var e = b(this), g = ["number", "readOnly", "score", "scoreName"];
a._callback.call(this, g);
if (this.opt.precision) {
a._adjustPrecision.call(this);
}
this.opt.number = a._between(this.opt.number, 0, this.opt.numberMax);
this.opt.path = this.opt.path || "";
if (this.opt.path && this.opt.path.slice(this.opt.path.length - 1, this.opt.path.length) !== "/") {
this.opt.path += "/";
}
this.stars = a._createStars.call(this);
this.score = a._createScore.call(this);
a._apply.call(this, this.opt.score);
var f = this.opt.space ? 4 : 0,
d = this.opt.width || (this.opt.number * this.opt.size + this.opt.number * f);
if (this.opt.cancel) {
this.cancel = a._createCancel.call(this);
d += (this.opt.size + f);
}
if (this.opt.readOnly) {
a._lock.call(this);
} else {
e.css("cursor", "pointer");
a._binds.call(this);
}
if (this.opt.width !== false) {
e.css("width", d);
}
a._target.call(this, this.opt.score);
e.data({settings: this.opt, raty: true});
});
}, _adjustPrecision: function () {
this.opt.targetType = "score";
this.opt.half = true;
}, _apply: function (c) {
if (c && c > 0) {
c = a._between(c, 0, this.opt.number);
this.score.val(c);
}
a._fill.call(this, c);
if (c) {
a._roundStars.call(this, c);
}
后面还有 309 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。