Skip to content

Commit

Permalink
documentation for events and renamed event namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Schroter committed Nov 20, 2013
1 parent 84ad9f5 commit 3777482
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,14 @@ $('.tlt').textillate({
callback: function () {}
});
```

##Events

Textillate triggers the following events

* start.tlt - triggered when textillate starts
* inAnimationBegin.tlt - triggered when the in animation begins
* inAnimationEnd.tlt - triggered when the in animation ends
* outAnimationBegin.tlt - triggered when the out animation begins
* outAnimationEnd.tlt - triggered when the in animation ends
* end.tlt - triggered when textillate ends
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ <h2>Dependencies</h2>
}, 2000);

var $tlt = $viewport.find('.tlt')
.on('start.textillate', log('start.textillate triggered.'))
.on('inAnimationBegin.textillate', log('inAnimationBegin.textillate triggered.'))
.on('inAnimationEnd.textillate', log('inAnimationEnd.textillate triggered.'))
.on('outAnimationBegin.textillate', log('outAnimationBegin.textillate triggered.'))
.on('outAnimationEnd.textillate', log('outAnimationEnd.textillate triggered.'))
.on('end.textillate', log('end.textillate'));
.on('start.tlt', log('start.tlt triggered.'))
.on('inAnimationBegin.tlt', log('inAnimationBegin.tlt triggered.'))
.on('inAnimationEnd.tlt', log('inAnimationEnd.tlt triggered.'))
.on('outAnimationBegin.tlt', log('outAnimationBegin.tlt triggered.'))
.on('outAnimationEnd.tlt', log('outAnimationEnd.tlt triggered.'))
.on('end.tlt', log('end.tlt'));

$form.on('change', function () {
var obj = getFormData();
Expand Down
2 changes: 1 addition & 1 deletion jquery.textillate.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
};

base.triggerEvent = function (name) {
var e = $.Event(name + '.textillate', { data: base });
var e = $.Event(name + '.tlt', { data: base });
$element.trigger(e);
return e;
};
Expand Down

0 comments on commit 3777482

Please sign in to comment.