【问题标题】:jQuery Countdown animate only which is changingjQuery Countdown 仅对正在更改的动画进行动画处理
【发布时间】:2013-03-03 22:38:37
【问题描述】:
【问题讨论】:
标签:
jquery
jquery-countdown
【解决方案1】:
$("your_counter").countdown({
/* your settings */
onTick: tickHandler
}
var tickStorage = [0,0,0,0,0];
function tickHandler(data){
$(".countdown-amount").each(function(index){
if(this.innerText !== tickStorage[index]){
$(this).parent().addClass("changed")
} else {
$(this).parent().removeClass("changed")
}
tickStorage[index] = this.innerText
})
}
也许有点像这样?