1//break out of for loop
2for (i = 0; i < 10; i++) {
3 if (i === 3) { break; }
4}
1var i, factor,
2 duration = 250,
3 delayTime = 500;
4
5for (i = 2, factor = 0; i <= 4; i++, factor++) {
6 galleryAnimation(i, factor);
7}
8
9function galleryAnimation(i, factor) {
10 $("#pic" + i).delay(factor * delayTime).fadeIn(duration);
11}