0

I build a guestbook and i want to add the Timeago-plugin from Yarp (http://timeago.yarp.com/).

I have this javascript on the top of the page:

<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery("abbr.timeago").timeago();
    });
</script>

Then i have an While-loop there i publish the text from the database. And on each text i have a DATETIME stored.

<abbr class="timeago" title="<?php echo $Date; ?>"><?php echo $Date; ?></abbr>

So, How do I get it to update the dates?

gen_Eric
  • 223,194
  • 41
  • 299
  • 337
Andreas
  • 121
  • 2
  • 4
  • 10
  • What's the question? What are you trying to update? The page? The database? What does your code do and what do you want it to do? – gen_Eric Jan 08 '14 at 19:21
  • It should go automatically. That's why you use it ;) Is your date formatted in [ISO_8601](http://en.wikipedia.org/wiki/ISO_8601) ? - If not, see [here](http://stackoverflow.com/questions/5322285/how-do-i-convert-datetime-to-iso-8601-in-php) – malte Jan 08 '14 at 19:23
  • What version jQuery do you use? Seems to work fine for me. http://jsfiddle.net/K5zMp/ – putvande Jan 08 '14 at 19:27

0 Answers0