/    Sign up×
Community /Pin to ProfileBookmark

4 or more counters

Hi, i have 5 boxes on the home page of my site that need to display count down timers in the following format

02[COLOR=”RED”]D[/COLOR] 07[COLOR=”RED”]H[/COLOR] 54[COLOR=”RED”]M[/COLOR] 33[COLOR=”RED”]S[/COLOR]

The problem is that the 5 boxes are randomly generated and the they all are counting down from different times.

I am not sure how to handle this as i need to set 5 different times and link them to each box for each count down timers.

Has anyone come across any code that covers this, thanks in advance fo your help… it would be much appreciated…

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Declan1991Mar 22.2012 — They are the same timer yes? Then simply keep the timer in seconds and convert it into minutes, hours and days for display.

s = count%60 = seconds

m = ((count-s)/60)%60 = minutes (among other ways)

etc.
Copy linkTweet thisAlerts:
@oo7mlauthorMar 22.2012 — Hi, thanks for your reply... no they are different timers... e.g

Box 1 - needs to countdown from 12:00 08 May 2012

Box 2 - needs to countdown from 17:30 04 Apr 2012

Box 3 - needs to countdown from 09:30 01 Apr 2012

Box 4 - needs to countdown from 14:00 29 Mar 2012

Box 5 - needs to countdown from 19:45 27 Mar 2012
×

Success!

Help @oo7ml spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...