Textillate プラグイン(デモはこちら)を使用して、単語/フレーズのグループを循環できるようにしたいと考えています。現在、必要なアニメーションを表示して実行するために 2 つの単語/フレーズ (表示したい最大量) を取得できますが、3 つ目を追加すると、同じ 2 つの単語に 3 つ目の単語/フレーズとして表示されます。三行目。最初の 2 つの単語/フレーズと次の 2 つの単語/フレーズを循環させるにはどうすればよいですか?
HTML:
<div class="phrase-a">
<p class="tlt">This is the first phrase</p>
</div>
<div class="phrase-b">
<p class="tlt">This is the second phrase</p>
</div>
<div class="phrase-c">
<p class="tlt">This is the third phrase</p>
</div>
<div class="phrase-d">
<p class="tlt">This is the fourth phrase</p>
</div>
JS:
$('.phrase-a .tlt').textillate({
in: {
shuffle: false,
sync: true
},
out: {
effect: 'fadeOutRightBig',
shuffle: false,
sync: true
}
)};