$(document).ready(function(){
var refreshId = setInterval(function() {
periodicRefresh();
}, 9000);
})
.
function periodicRefresh()
{
$.ajax({
type: 'GET',
url: 'include/ajaxActions.php',
data: "action=displayLastEvent",
success: function(msg){
var newid = $(msg).attr("id");
current = $("#list tr:first").get(0).id;
if(newid != currentfirstrow){
$("#list").prepend(msg);
lastrow = current-19;
$('#'+lastrow).remove();
}
}
});
}
Here is an example of what the table row looks like:
<tr id="5094" style="background:White;">
<td class="tdstd">
</td>
</tr>