teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

ソース修正

2022/01/03 07:33

投稿

recal
recal

スコア1128

answer CHANGED
@@ -9,9 +9,9 @@
9
9
  function showNextTxt() {
10
10
  txtIndex++;
11
11
  if(txtIndex != txtMax){
12
- txts.eq(txtIndex % txts.length).fadeIn(200).delay(300).fadeOut(200, showNextTxt);
12
+ txts.eq(txtIndex).fadeIn(200).delay(300).fadeOut(200, showNextTxt);
13
13
  }else{
14
- txts.eq(txtIndex % txts.length).fadeIn(200);
14
+ txts.eq(txtIndex).fadeIn(200);
15
15
  }
16
16
  }
17
17
  showNextTxt();