straversi / Typer.js

Typing effect completely configurable in HTML.
http://steven.codes/typerjs
MIT License
135 stars 23 forks source link

Adding the ability to control looping #3

Closed davidgeere closed 7 years ago

davidgeere commented 7 years ago

I like the simplicity of this library. I do though think it could use the ability for a developer to set if it never loops, always loops or loops n times. So I added some code that if you add the attribute as such:

This unfortunately only works with non-delimited words, mainly because multiple delimitations was just not a use case for me. I will submit another change once I get to that.

straversi commented 7 years ago

Thank you for making this improvement, I love it! I had just one comment before I want to pull the change.

straversi commented 7 years ago

Thanks for updating-- since true == 1, this.loop <= p.looped was activating if dataset-loop was not set. Since string < number is not true, the new version is fine.

davidgeere commented 7 years ago

Awesome, thanks Steven! Thanks for creating this library in the first place. :)