j = {largeSign: function(a) {
var b = $(#identity .scorecard"), c = 43, d = 105 - c, e = 800;
this.animation(b, d, c, e, a)
},animation: function (a, b, c, d, e) {
var f = this, g = 1e3, h, i = function() {
$(".sign", a).each(function(a, f) {
h = parseInt(e + $(this).text()), a > 2 && (d += 30), a === 0 || a === 3 ? $(this).animate({backgroundPosition: "0px " + (b * h + c) + "px"}, d * 1.6) : a === 1 || a === 4 ? $(this).animate({backgroundPosition: "0px " + (b * h + c) + "px"}, d * 1.8) : (a === 2 || a === 5) && $(this).animate({backgroundPosition: "0px " + (b * h - b + c) + "px"}, d * 2, function() {
$(this).delay(200).animate({backgroundPosition: "0px " + (b * parseInt(e + $(this).text()) + c) + "px"}, 1e3)
})
})
};
setTimeout(i, g)
}}
基本上我正在尝试为背景位置设置动画,并让它停在已在 div .sign 中解析的值上。