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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:20:11+00:00 2026-06-03T01:20:11+00:00

I have a strange client request that doesn’t seem to fit any off-the-shelf jQuery

  • 0

I have a strange client request that doesn’t seem to fit any off-the-shelf jQuery plugins and I’m struggling to work out how best to implement.

Basically it’s for a counter representing the co2 emissions projected to have been saved.
The idea is that the counter will run based on the previous months’ figures.

So at the start of each month a web admin will set the start / end values.

Then over the month the page needs to load at a start point (calculated in PHP based on the date versus start point), then increment from there every 5 seconds.

So in an example:

startValue = 200000;
endValue = 225000;
updateInterval = 5; /* seconds */

We’d have 25,000 units to count up during that time.
This 25,000 should be divided by the number of 5 second increments in a month and the counter needs to increase every 5 seconds.

I think I finally understand the theory (my client sent it in the most convoluted explanation!) but I’m struggling to work out how to tackle it.

I think it’s simple… but would appreciate some pointers to get me on the way!

Thanks,
Steve

  • 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-06-03T01:20:13+00:00Added an answer on June 3, 2026 at 1:20 am

    maybe something to start:

    html:

    <div id="start">20</div>
    <div id="end"></div>
    <div id="interval">5</div>
    

    js:

    var start    = 21;
    var end      = 25;
    var interval = 5000;    
    
    var refreshIntervalId = setInterval(function(){
       if(start <= end){
          $("#start").text(start++);
       }else{
          stop();   
       }
    },interval);
    
    function stop(){
       clearInterval(refreshIntervalId);    
    }​
    

    Demo

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

Sidebar

Related Questions

I have strange problem with receiving data from socket. On client im using air
I have a strange problem that is only happening in a single location. I
I am working on a client's site that used to have all .swf files
I have come acrooss a very strange problem. I use a POST request for
I have an very strange error: when I want to use the SocialServer::Client class
I'm trying to create a client for a WCF service that I have hosted
I'am building simple Ajax application (via jquery). I have strange issue. I found where
I have current PHP codebase written in procedural (mainly) style that our client is
I have a problem. I have coded a wcf client (WPF and c#) that
I have a strange problem with native Ajax request invoking. I am creating the

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.