Skip to content

mfyll/simpleCountdownjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simpleCountdownjs

A very simple Javascript for website countdowns.

How to use

In the example.html-file, you will find theese DIV-objects. The Javascript will replace the contents of the objects with the IDs "days", "hours", "minutes" and "seconds" with the correct value. Place the DIVs where you prefer them to be.

  <div class="countElement">
      <span id="days"></span>
      <div class="footer">day(s)</div>
    </div>
    <div class="countElement">
      <span id="hours"></span>
      <div class="footer">hour(s)</div>
    </div>
    <div class="countElement">
      <span id="minutes"></span>
      <div class="footer">minute(s)</div>
    </div>
    <div class="countElement">
      <span id="seconds"></span>
      <div class="footer">second(s)</div>
    </div>

Configuring the countdown is simple, like in the example.html-file, you will find a date at the bottom of the file. Change the date to the one you wish to count to. The bottom of the file should look like this:

  <script>
    var date = "February 5, 2016 18:00:00";
  </script>
  <script src="countdown.js"></script>

License

This work is protected by the GNU GENERAL PUBLIC license.

About

Simple countdown javascript with example. Very easy to use and understand.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors