textillate icon indicating copy to clipboard operation
textillate copied to clipboard

class="current"

Open dragoncaller opened this issue 10 years ago • 12 comments

Downloaded the latest .js, but class="current" appears twice when text animates. Thoughts?

dragoncaller avatar Feb 28 '14 04:02 dragoncaller

same problem for me... :-/

timfalcucci avatar Mar 01 '14 09:03 timfalcucci

It's not a good solution... but it works when I comment the line 139 :

$elem.addClass('current');

timfalcucci avatar Mar 01 '14 11:03 timfalcucci

I've just come across this same issue, any text that is animated will have "class="current">" before the text, driving me crazy

joespud avatar May 04 '14 18:05 joespud

Is anyone able to provide a jsFiddle showing the issue? My test shows the current class only being applied to a single text at a time.

Here's a base fiddle: http://jsfiddle.net/jschr/vzsUd/

jschr avatar May 05 '14 01:05 jschr

same problem for me, but it occurs only if i use a span inside the h1 element

Dontorpedo avatar May 26 '14 20:05 Dontorpedo

https://github.com/jschr/textillate/issues/6

nyanMouse avatar May 27 '14 15:05 nyanMouse

Same problems when the text to be animated is within p and /p

Works fine in the other cases (I have tested)

thistlillo avatar May 29 '14 12:05 thistlillo

@thistlillo are you able to reproduce the issue in a jsfiddle? I tried modifying the one I posted above so that the text is inside a p tag but I still don't see it: http://jsfiddle.net/BHUL4/

Thanks

jschr avatar May 29 '14 12:05 jschr

Yes, I modified your fiddle. I hope it kept the changes: http://jsfiddle.net/BHUL4/2/

thistlillo avatar May 29 '14 13:05 thistlillo

Textillate only currently supports animating text, not any html. See https://github.com/jschr/textillate/issues/6. You'll have to wrap the entire container in a p tag similar to the fiddle in my previous post.

jschr avatar May 29 '14 13:05 jschr

Yes, that was the solution I found. Not a big issue actually, but I thought you might find interesting the behaviour in my case. Indeed, thanks for your work.

thistlillo avatar May 29 '14 13:05 thistlillo

Thanks. My goal is to support it in a future release.

jschr avatar May 29 '14 13:05 jschr