<commit_before># TimedEvent

## Options and Attributes
By default the plugin will look for explicit options passed in via javascript instantiation. If nothing is passed then the plugin will look for on element declaration. Those available declarations are:

```data-emit-target=" " ```
target element to emit event from

```data-emit-event=" " ```
Custom event name that will be emmited at the end of a countdown

## Example usage

**Using default event being triggered from timer element**

```
<span class="countDownDefault"></span>
$('.countDownDefault').TimedEvent().on("cd.finish",function(){
   // make magic happen
});
```

**Listening for a custom event on the timer element**

 ```
 <span class="countDown" data-emit-event="my.refresh"></span>
 $('.countDown').TimedEvent().on("kjc.priceRefresh",function(){
    // make magic happen
});
```

**Target a custom element to trigger the event from**

the timer, somewhere else on the page

```
<span class="countDownDefault" data-emit-target="#displayDefaultTarget"></span>
```

the target element listening for what ever event is triggered, somewhere on the page

```
<div id="displayDefaultTarget"></div>
```

```
$('#displayDefaultTarget').on("cd.finish",function(e){
    // make magic happen
});
```

## Roadmap
- Support for numerical string types eg: mm:ss<commit_msg>update usage documentation, add bugs section and another item into the roadmap<commit_after># TimedEvent
*version:1*

TimedEvent is a jQuery  plugin that displays a countdown timer then triggers a custom event once the timer reaches 0. This event can also be triggered on a remote object rather than the timer.

## Options and Attributes
By default the plugin will look for explicit options passed in via javascript instantiation. If nothing is passed then the plugin will look for on element declaration. Those available declarations are:

```
data-emit-target="#mySelector, .class .selector"
```
or
```
{
    emitTarget:"#mySelector, .class .selector"
}
```
target element to emit event from

```
data-emit-event="my.customEvent"
```
or
```
{
    emitEvent:"my.customEvent"
}
```
Custom event name that will be emmited at the end of a countdown
Default: "te.finish"

```
data-emit-time="30"
```
or
```
{
    emitTime:"my.customEvent"
}
```
The time period between events being triggered.
Default: 30seconds

## Example usage

**Using default event being triggered from timer element**

```
<span class="countDownDefault"></span>
$('.countDownDefault').TimedEvent().on("te.finish",function(){
   // make magic happen
});
```

**Listening for a custom event on the timer element**

 ```
 <span class="countDown" data-emit-event="my.refresh"></span>
 $('.countDown').TimedEvent().on("kjc.priceRefresh",function(){
    // make magic happen
});
```

**Target a custom element to trigger the event from**

the timer, somewhere else on the page

```
<span class="countDownDefault" data-emit-target="#displayDefaultTarget"></span>
```

the target element listening for what ever event is triggered, somewhere on the page

```
<div id="displayDefaultTarget"></div>
```

```
$('#displayDefaultTarget').on("te.finish",function(e){
    // make magic happen
});
```

## Bugs

This plugin is only new so feedback and useful bug reports are extremely handy. A bug is a *demonstrable problem* that is caused by the code in the
repository. Good bug reports are extremely helpful!

## Roadmap
- Support for various numerical display types eg: mm:ss
- Pause timer event

## Suggestions
I am open to enhancements to the plugin so please send ideas or suggestions through.
{'fraction_non_alphanumeric': 0.12897822445561138, 'fraction_numerical': 0.0016750418760469012, 'mean_word_length': 4.807131280388979, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3885049', 'n_tokens_mistral': 1016, 'n_tokens_neox': 969, 'n_words': 395}