Skip to content

Commit

Permalink
add current class to li being animated
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Schroter committed Dec 7, 2013
1 parent e22c5a0 commit 16a9311
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jquery.textillate.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@
, options = $.extend({}, base.options, getData($elem))
, $chars;

$elem.addClass('current');

base.triggerEvent('inAnimationBegin');

base.$current
Expand Down Expand Up @@ -177,6 +179,8 @@
, $chars = base.$current.find('[class^="char"]')
, options = $.extend({}, base.options, getData($elem));

$elem.removeClass('current');

base.triggerEvent('outAnimationBegin');

animateChars($chars, options.out, function () {
Expand Down

0 comments on commit 16a9311

Please sign in to comment.