Record / Memo
js setTimeoutのコールバックに引数を渡す時は、setTimeoutの第3引数
// OK setTimeout(function(){ $(‘.target’).eq(index).stop().animate({ opacity: 1 }, { duration: 300, easing: ‘e
// OK
setTimeout(function(){
$('.target').eq(index).stop().animate({
opacity: 1
}, { duration: 300, easing: 'easeOutCubic' }
); // animate
}, 400, index ); // setTimeout
// NG
setTimeout(function(index){
$('.target').eq(index).stop().animate({
opacity: 1
}, { duration: 300, easing: 'easeOutCubic' }
); // animate
}, 400 ); // setTimeout