Skip to content

A weekly countdown timer which easily allows for customizations

Notifications You must be signed in to change notification settings

joe-allen/countdown-recur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Countdown Recur

A jQuery plugin for a weekly countdown timer which easily allows for the customization of start date, end time and number of weeks to repeat.

(The timer also takes into account the timezone of the user).

Dependencies

To use this plugin you need these dependencies:

Installation

<div id="countdown_timer"></div>
$('#countdown_timer').countdown_timer({
  startDate: '04/25/2018',
  weeksToRecur: 4
});

Settings

  // Madatory settings:
  startDate: '04/25/2018',              // Set today's date (!important - must set otherwise countdown will not end)
  weeksToRecur: 1                       // Set number of weeks countdown should recur, defaults to 4 weeks

  // Optional settings:
  debug: false,                         // This stops the time in order to update the css
  textColor: 'green',                   // Color of timer text, defaults to green
  endDay: 'Sunday',                     // End day for timer, defaults to "Sunday"
  endTime: '11:59:59 pm',               // End time for timer, defaults to "11:59:59 pm", Format like '05:05:20 pm'
  endTimeText: "Sorry, time's up",      // Text to show user after timer ends

Things to remember

If startDate is set before today's date/time it will still function. Keep in mind, it will continue to run the number of weeks set in weeksToRecur after that of the startDate.

For the least amount of timer down time, it's recommended to use an endTime of "11:59:59 pm", because the countdown stops on the endDay after endTime and won't pick back up the next day at 12:00:00am.

ToDo

  • Add countdown sound fx 🤘

About

A weekly countdown timer which easily allows for customizations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published