<div class=”direct-chat-messages”>

<div class=”direct-chat-msg”></div>

<div class=”direct-chat-msg”></div>

</div>

<script>

function doSomething() {
//alert(“10 seconds”);
var todoId =”<?php echo $todoId; ?>”;
var dataString = ‘todoreplayId=’ + todoId;
$.ajax({
type: “POST”,
url: ‘loadcat/todo-replay.php’,
data: dataString,
cache: false,
success: function(html) {
}
})
.done(function(data) {
$(‘.loader’).hide();
$(‘.direct-chat-messages’).html(data);
});

setTimeout(doSomething, 10000);
}
setTimeout(doSomething, 10000);

</script>