Solved

can someone please advise how to create a jquery countdown and place result in array

Posted on 2012-04-11
2
207 Views
Last Modified: 2012-04-15
I am working on a countdown clock to add to my site.

I need to find how many days until 5th May 1980 then cut up the numbers into an array.

Can someone please advise or provide sample code for the best way to do this using Jquery.
0
Comment
Question by:jecommera
2 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 37837412
try this :
var arr = [];
var j = 0;
for(var i=new Date().getTime();i>new Date(1980,4,5).getTime();i -= (24*3600 * 1000)) arr.push(j++);

Open in new window

0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37839780
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help with jQuery plugin 10 28
combining jquery scripts 3 25
Javascript and Jquery not firing 9 48
jquery - show / hide div depending on day and time 19 46
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question