Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a small social website, and it has a "wall" where all user posts are shown. The "wall" has this function in it
XML
<script>$(function load_posts(){  $("#all_posts").load("/all_posts.php")
setTimeout(load_posts, 500);})</script>
<div id="all_posts"></div>

Where "all_posts.php" shows all of the posts. However each posts has a date and the timeago.js with it so it displays "posts 2 hours ago" etc.
But when the function is called and the all_posts.php is reloaded the time flashes for a second then disappears...does anyone know why this is and how i could fix it?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900