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 6913323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:12:12+00:00 2026-05-27T09:12:12+00:00

OK, so I am using a jQuery plugin called CountUp: http://blog.ogulcanorhan.com/weekend-project-jquery-countup-plugin/ The script is

  • 0

OK, so I am using a jQuery plugin called CountUp: http://blog.ogulcanorhan.com/weekend-project-jquery-countup-plugin/

The script is fairly simple:

<script type="text/javascript">
    $(document).ready(function(){
            $('#jq_count_up').countUp({'lang':'en', 'format':'full', 'sinceDate': 'dd/mm/YYYY-hh:mm:ss'});
    });

So the jQuery takes a starting timestamp (dd/mm/YYYY-hh:mm:ss) and then returns the days, hours, minutes, seconds since the input timestamp above. The result will be displayed in side a tag, as shown below:

Simple enough and it works great if you are only using the code one time on the page. I have multiple timestamps which I am wanting to apply this script to. The application is an email queue of how long people have been waiting. So to try to fix this, I dynamically generated the timestamp via PHP on the server side and I also changed the name of the div so that it was unique for each of the multiple timestamps. For example, here is the output of my PHP:

………………..

    </td><td>
<script type="text/javascript">
    $(document).ready(function(){
        $('#jq_count_up-4').countUp({'lang':'en', 'format':'full', 'sinceDate': '04/12/2011-14:56:33'});
    });
</script>
<div id="jq_count_up-4"></div>
</td><td>

(then later on in the same HTML output:

</td><td>
<script type="text/javascript">
    $(document).ready(function(){
        $('#jq_count_up-2').countUp({'lang':'en', 'format':'full', 'sinceDate': '04/12/2011-08:44:43'});
    });
</script>
<div id="jq_count_up-2"></div>
</td><td>

So notice that I did 2 things to try to fix this issue:

  • I changed the name of the reference to the div name tag within the script (I think) from '#jq_count_up-2' to '#jq_count_up-X' where X is a unique number.
  • I changed the name of the <div id=> tag so that it is unique as well, and is the same name as in #1 above.

So the result is that still only one of the timestamps works, and it is the last one on the page….. Any help would be appreciated!

  • 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-27T09:12:13+00:00Added an answer on May 27, 2026 at 9:12 am

    It doesn’t look like the plugin is designed to be used more than once on a page. jQuery plugins need to be designed with that specifically in mind (here’s a brief introduction on how to achieve multiple instances). From the plugin code it appears that global variables are being set, so a second instance of the plugin will overwrite the counter in the first, etc.

    You could either tweak the plugin to support multiple instances and send it back to the author (he’ll love you) or find another one.

    Hope that helps.

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

Sidebar

Related Questions

I'm using a jQuery plugin called Colorbox (http://colorpowered.com/colorbox/) and loading content via Ajax. This
I am using jQuery plugin called GalleryView, in its Beta3 version (http://spaceforaname.com/galleryview). The Beta4
I'm using a jQuery plugin called qTip (http://craigsworks.com/projects/qtip/docs/api/#callbacks) and trying to implement a callback
I am using jquery lightbox plugin colorbox ( http://colorpowered.com/colorbox/ ) and i want to
I am using this new jQuery plugin called jsTree www.jstree.com and using the HTML
I am using jQuery plugin called jsPlumb - http://jsplumb.org/jquery/demo.html and I want to connect
I am using jQuery font selector plugin posted here http://www.fullfatcode.com/2011/04/10/jquery-font-selector-version-2/ It's all good, except,
I am using a jquery plugin from [ FilamentGroup ] called DateRangePicker. I have
I am using the jquery validation plugin from: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ How can I add a
I'm using a jQuery plugin called Tablesorter to do client-side sorting of a log

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.