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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:37:31+00:00 2026-06-04T11:37:31+00:00

Hey all i have posted the code to the countdown counter i am using.

  • 0

Hey all i have posted the code to the countdown counter i am using. It can be found on the JSFiddle page here: http://jsfiddle.net/QVwGt/

As you can see on that page, the timer start (in seconds) at 95 then it does 94, 93, 92, 91, 90, 85, 84, 83, 82, 81, 80, 75, 74… etc.

It should start with 59, 58, 57, all the way down to 00 then start back at 59 again. It used to do this when it has XXX days left, but now since its gone into 2 digit days, its started doing this and i’ve look through the code but am unable to find the source of the problem.

As far as it goes, even starting at 95, it does keep pace of the 59 second ticks (watching on the computers clock hand). But it doesn’t look nice starting at 95 :o)

Any help would be great in solving this problem! :o)

  • 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-04T11:37:32+00:00Added an answer on June 4, 2026 at 11:37 am
    digits[c].__max = ((c-1) % 2 == 0) ? 5: 9;
    

    you commented out the right code here

    digits[c].__max = (c % 2 == 0) ? 5: 9;
    

    http://jsfiddle.net/QVwGt/2/

    Basically, c is your iterator. So in this case, you’re looking for the second digit to max at 9, and the first to max at 5. Remember, your iterator is 0 based, and you’re thinking 1 based.

    In other words, 0 % 2 == 0 and 1 % 2 != 0 but you were looking at it and seeing 1 % 2 != 0 and 2 % 2 == 0

    It would be much clearer if it was written like this:

    digits[c].__max = ((c + 1) % 2 == 0) ? 9: 5;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all. I have the following code: http://jsfiddle.net/g7Cgg/ As you can see, there are
Hey all i have this code here on jsfiddle: http://jsfiddle.net/d7UjD/6/ I have 2 problems
Hey all. Here is the scenario. I have the below code, and I'm needing
Hey all, i have converted some C# PayPal API Code over to VB.net. I
Hey all, this is the code i have to check for a day thats
Hey all. Basically I have a page full of text input fields with default
Hey all- I have looked this up on here and Google but none of
Hey all, I have a linq app using C# express2008 and sqlserver express 2005
Hey all, I have created a WinForms to handle Persistence Activities using the Windows
Hey all trying to play with nodejs MVC using express and mongoose. I have

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.