グーグル検索で探せるはずなのに見つからなかったのでこちらで質問させていただきます。
2 番目の if ステートメントでエラーが発生し続けるので、既存の if/else ステートメント内に別の if ステートメントを配置することは許可されていないのではないかと考えていました。
ご覧いただきありがとうございます。
function flipImages(){
currentImage = flipArray[i];
if (i == 6) {
clearInterval(interval)
}
else {
// add an opacity animation to the flip so that it is less jarring
// set at a 100ms fade in
$(currentImage).animate({
opacity: 1
}, 100, function() {
console.log(flipArray[i]);
}
// also animate in the child divs of the currentImage (which will only be text on
// the "final" div)
if ( $(currentImage).children().hasClass('final'){
$(currentImage).children().animate({
opacity: 1,
left: '+=50'
}, 500, function(){
console.log( $(currentImage).children() );
});
});
);
i++;
};
}