I want to refresh the table but every time the setinterval active the append insert the same rows again, i want that those rows get removed for the new ones
$(document).ready(function()
{
function actualizar()
{
$.ajax({
type: "GET",
url: "editinplace.php?tabla=1"
})
//Vector
.done(function(json)
{
json = $.parseJSON(json)
for(var i=0;i<json.length;i++)
{
$('.editinplace').append
(
"<tr><td class='id'>"
+json[i].id
+"</td><td>"
+json[i].nombre
+"</td><td>"
+json[i].apellidos
+"</td><td>"
+json[i].telefono
+"</span></td><td class='editable' data-campo='status'><span>"
+json[i].status
+"</span></td></tr>");
}
//
});
}
setInterval(actualizar, 6000);