我有一个倒计时(keith-wood.name)脚本,并且只想改变每个刻度上改变的数字的颜色。这是结构(看起来像09:34:57):
window.oldcount = '<span class="hours"><span>0</span><span>9</span></span>:<span class="minutes"><span>3</span><span>4</span></span> <span class="seconds"><span>5</span><span>7</span></span>';
function onTick() {
var newcount = $('#countdown').html();
$.each('span',newcount, function() {
// how to find the corresponding span in oldcount and see if it is different than newcount - if so addClass 'red' else removeClass 'red'
});
window.oldcount = newcount;
}
我不确定如何完成每个范围。任何人都可以帮助(或者让我更好地改变这个倒计时脚本中只有改变数字onTick的颜色)?谢谢!