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

  • SEARCH
  • Home
  • 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 7017363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:54:16+00:00 2026-05-27T22:54:16+00:00

I tried some ways but no chance: http://timeago.yarp.com/ $(function() { $(‘abbr.timeago’).timeago(); $(‘.more’).click(function() { $.getJSON(‘http://127.0.0.1:9987/test/c.php?callback=?’,

  • 0

I tried some ways but no chance: http://timeago.yarp.com/

$(function() {
$('abbr.timeago').timeago();
    $('.more').click(function() {
    $.getJSON('http://127.0.0.1:9987/test/c.php?callback=?', function(datas){
                $.each(datas, function(i, data) {       

                    $('.fdiv2 .fdtl').html('<abbr class="timeago"></abbr');             
            });         
        });
    $('.fdiv2 .fdtl').slideToggle(1000);
});

});
  • 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-27T22:54:16+00:00Added an answer on May 27, 2026 at 10:54 pm

    You have to re-initialize timeago on the recently inserted element. Also cache what is cachable (no need to invoke $('.fdiv2 .fdtl') multiple times):

    $(function() {
        var el = $('.fdiv2 .fdtl'); // cache the element
        $('abbr.timeago').timeago();
        $('.more').click(function() {
            $.getJSON('http://127.0.0.1:9987/test/c.php?callback=?', function(datas){
                $.each(datas, function(i, data) {
                    el.html('<abbr class="timeago"></abbr>');
                    el.find('abbr.timeago').timeago();
                });
            });
            el.slideToggle(1000);
        });
    });
    

    Also make sure that you really should iterate through datas – if it always contains one element in the array, you can replace $.each() call with var data = datas[0];. If it has more elements and you want to use only the last one (it looks like this is the case here, but you are not showing us the whole code), then you can replace it with var data = datas[datas.length-1]; (which will assign last element to data variable).

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

Sidebar

Related Questions

I need to combine Expression Engine with http://www.infinite-scroll.com . I have tried numerous ways
Tried to install some program, it gives above message requiring 1.1.4322. BUT as the
I have tried to find some decent documentation on traversing in jQuery, but have
Can this code be shorten in some way? I've tried several ways to compact
I have tried to use some of the max length functions found here, but
I tried some add to favorties JavaScript scripts.. With IE8, I get an access
Just tried some small graphics application of mine on Windows 7, and I'm getting
I've looked for some other articles on this problem and even tried some of
I'm just curious to know about this.When i heard about Spring.net and tried some
I am very interested in streaming data for web-applications. I have tried out some

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.