I'm trying to get an hour of a certain post
update every 1 minute.
Code:
setTimeout(function() {
var ID = $(this).attr('id').split('hora')[1]; // pega o ID e retira a parte "like"
$.get('index.php?hora=1&id='+ID, function(resultado){
$('#hora'+ID).html(resultado);
});
}, 2000 );
Error
index.php
: 502 Uncaught TypeError: Can not read propertysplit
of undefined (...)