Closed Snazzyham closed 6 years ago
Hey @Snazzyham
Currently Textillate doesn't support rendering JS strings nicely. This is would a great enhancement for v2.
In the meantime, you need to manually construct the correct html structure before initializing the plugin:
<h1 class="tlt">
<ul class="texts">
<li data-out-effect="fadeOut" data-out-shuffle="true">Some Title</li>
<li data-in-effect="fadeIn">Another Title</li>
</ul>
</h1>
Here is an example: http://jsfiddle.net/jschr/81xb9nyy/
Hey Jordan,
Thanks for your response. I appreciate it.
Soham Adwani | Tech Enthusiast @snazzyham
On 22 December 2015 at 10:41:06 PM, Jordan Schroter (notifications@github.com) wrote:
Hey @Snazzyham
Currently Textillate doesn't support rendering JS strings nicely. This is would a great enhancement for v2.
In the meantime, you need to manually construct the correct html structure before initializing the plugin:
Here is an example: http://jsfiddle.net/jschr/81xb9nyy/
— Reply to this email directly or view it on GitHub.
Is it possible to dynamically insert li node to play dynamic events or notification?
@naivefun unfortunately textillate could handle dynamic text a lot better, definitely something I wanna do in future version. For right now I think you're stuck with removing and initializing a new textillate instance.
So I'm trying to build a random quote generator and right now I've got an array;
and then I've got some code that calculates a random number and I end up with
and in my HTML I've got
and everything works fine but no matter where I add the .tlt class to for textillate, I can't seem to get it to animate the text, it just shows the text without animating it.
My apologies for not being very clear with what I'm working with, but any help would be appreciated.