kbwood/countdown — pull request #17 by onfire4g05 (2013-07-07 21:36:01+00:00)
Title: Add Template System for Periods

I really like the plugin; however, I was forced to modify it to remove the
that is placed in the code between the period and label (ie: 2
days). I thought about just adding a hack for backwards compat (just make a
and make it part of the options. That wouldn't solve the problem though of there being HTML mixed with JS. Thus, this pull request.

This will fix that and allow the developer to design the elements however they want -- if they want, they can remove all of the spans and just have a period and label.

Here is an example of how I am using it:

```javascript
{
until: new Date(date_time),
format: 'dHMs',
labels: ['Years', 'Months', 'Weeks', 'days ', 'hours', 'mins', 'secs'],
labels1: ['Years', 'Months', 'Weeks', 'day ', 'hour', 'min', 'sec'],
onExpiry: this.syncClient.bind(this),
template_period: '' +
'%period% %period_label%',
}
```

I then use CSS to put spaces and commas, thus creating the following look:

1 hour, 24 mins, 38 secs
until Event