Z-CAROUTEXT is

Z-caroutext is a javascript plugin that lets you create a text carousel very easily.

It was just an exercise for me to try implementing something complete with vanillaJs in object oriented programmation, and decided to share it because it can be interresting for some of you :-).


How To

This plugin is very simple. You just have to add a span with some parameters. For exemple :

<h1>
Z-CAROUTEXT is
<span class="z-caroutext"
data-texts='["awesome!", "really good.", "extremly beautiful.", "so badass!"]'
data-timing="2000"
data-pipe-color="#2a2">
</span>
</h1>

Like usual, here is the emmet snippet :

*** WARNING: the data-text has to be between single quotes, for example : ' [ "1" , "2" ] ' .
Otherwise it won't be valid json array!!!

h1>{SOME TEXT}+span.z-caroutext[data-texts=***][data-timing=2000][data-pipe-color=#000]

Examples

<span class="z-caroutext"
data-texts='["No pipe"]'
data-timing="1000"
data-pipe-color="transparent">
</span>

<span class="z-caroutext"
data-texts='["Minimal code"]'>
</span>


<span class="z-caroutext"
data-texts='["Long timing", "named pipe color"]'
data-timing="5000"
data-pipe-color=lightblue">
</span>

<span class="z-caroutext"
data-texts='["Short timing", "rgb pipe color"]'
data-timing="10"
data-pipe-color=rgb(200,60,60)">
</span>

Suggestions, issues, etc... are welcome, on the github issue section.