I have a refreshing function which checks fresh data in the database every 60 seconds and, if found, adds it to the list.
I want it to be highlighted for a few seconds when it brings it on auto-refresh, yet it does nothing. It either highlights all the list, or nothing!
function clock(){
$.ajax({
url: "update.php",
data: "row=" + num,
cache: false,
success: function(data){
$("#ads").prepend(data);
$(data).effect('highlight', {}, 5000);
}
});
}
setInterval(clock, 60000);
What am I doing wrong?