Please tell me the example of this markup:
<div '.$title.' '.$bg.' > <!-- Message. Default to the left --> <div class="direct-chat-msg"> <div class="direct-chat-info clearfix"> <span class="direct-chat-name pull-left"> </span> <span class="direct-chat-timestamp pull-right"> <form method="post" action=""> <b> '.$p.' <i>'.$result['tema'].' </i></b> '.$sta.' '.$datetime.' </span> </form> </div> <!-- /.direct-chat-info --> <img class="direct-chat-img" src="/img/'.$result['foto'].'.jpg" alt="Message User Image"><!-- /.direct-chat-img --> <div class="direct-chat-text"> '.$result['mes'].' </div> <!-- /.direct-chat-text --> </div> <!-- /.direct-chat-msg --> </div> In the script, a div is specified for display, as I understand it, you need something like this:
$("#dtr").append("указать div с id записи или как?"); If you specify html, it duplicates
function show() { $.ajax({ url: "../../ajax/select/dialog.php", cache: true, success: function(html){ $("#dtr").append(html); } }); } $(document).ready(function(){ show(); setInterval('show()',3000); }); Thank)
append? - Igorappendthat you now have in the code? - Igor