Solved

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

Posted on 2012-04-11
2
200 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
Comment Utility
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
Comment Utility
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery (http://jquery.com/) 1.6 introduces .prop() (http://api.jquery.com/prop/) and .removeProp() (http://api.jquery.com/removeProp/) methods which allow modifying or removi…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now