Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6580041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:58:30+00:00 2026-05-25T15:58:30+00:00

I am using Jquery plugin http://timeago.yarp.com/ for showing time. Issue is timeago will not

  • 0

I am using Jquery plugin http://timeago.yarp.com/ for showing time.

Issue is timeago will not take effect for dynamically generated items.

    $(document).ready(function() {

         $(".timeago").timeago();       // works perfectly fine for the items which are loaded on page load

         //$(".timeago").live(timeago());      // gives me an error ie timeago is not defined

         //$(".timeago").live($(".timeago").timeago());  // gives me an error too much recursion.
         jQuery.timeago.settings.allowFuture = true;
});

From some google search I got to know something ie:

Using live is the same as using bind, except that it is limited only to the events click, dblclick, keydown, keypress, keyup, mousedown, mousemove, mouseout, mouseover, and mouseup.

Now how can do it cause I dont have any click event? How can I bind this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:58:30+00:00Added an answer on May 25, 2026 at 3:58 pm

    .live() and .bind() assign callbacks to event. In your case, you don’t have an event to assign the function to and so it fails.

    You can, in theory, assign your callback to a custom event. You will however have to manually trigger the event (using .trigger()) whenever your item is generated. For example:

    $("abbr.timeago").live("timeago", function() {
       $(this).timeago();
    });
    
    // ... and in the bit that generates your item
    $new_item.trigger("timeago")
    

    Demo: http://jsfiddle.net/ZjuW4/9

    Of course, using .live() in this situation is purely academic and does not really serve a good purpose.

    If you do have access to the code that’s generating the items, you can simply chain in the call to .timeago() as the items are generated, i.e. http://jsfiddle.net/ZjuW4/3/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which is built dynamically using this jQuery plugin http://code.google.com/p/jquery-dynamic-form/ When
Using the jQuery plugin http://jquery.com/plugins/project/jquerylightbox_bal Is there a way to have the title and
I'm using jQuery ThickBox plugin ( http://jquery.com/demo/thickbox/ ). I have been concentrating on functionality
I'm using a JQuery plugin ( http://docs.jquery.com/Plugins/Autocomplete ) to add auto-completion to a city
I am using jQuery Form Plugin http://jquery.malsup.com/form/ to submit my form. Here is the
for this I am using colorbox jQuery plugin http://colorpowered.com/colorbox/ and a form. I am
I am using a jquery tablesorter plugin( http://tablesorter.com/docs/ ) for sorting my tables. This
I am using the jQuery plugin from http://mjsarfatti.com/sandbox/nestedSortable/ It does an excellent job on
I am using a JQuery plugin to render a calendar ( http://arshaw.com/fullcalendar/ ). Problem
I'm adding a Facebook 'like' button to the DOM using this jQuery plugin: http://onerutter.com/open-source/jquery-facebook-like-plugin.html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.