2
setInterval(function() {
var prevTopArticle = $("#toparticles table:first").html();
$("#toparticles").load("myurloffeed.com/topfeed", function()
{
alternateBG();
var newTopArticle = $("#toparticles table:first").html();
if (prevTopArticle!=newTopArticle)
{
$("#toparticles table:first").effect("highlight", {color:"#faffc4"}, 2000);
}
});
}, 8000);
所以它会将当前第一个表项的变量,装载有过的URL表的toparticles DIV,如果它们是不同的,将进行高光效果,然而它无论如何都会产生突出的效果,完全不确定它为什么不起作用。jQuery的动画,如果负载()返回不同的东西
尝试使用firebug和console.log来查看变量prevTopArticle和newTopArticle中有什么... – Chandu 2010-12-21 13:05:39
'alternateBG'做了什么? – 2010-12-21 13:34:08