jQuery animation if load() returns something different...
- by Dan LaManna
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);
So it sets the current first table item to a variable, loads the toparticles div with the tables off the url, and if they are different it will perform the highlight effect, however it does the highlight effect anyway, completely unsure why it isn't working.