Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.88 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.88 KB

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 🤘