I have this code:
jQuery(\'#flash\').animate({opacity: 0.35}, 200)
.animate({opacity: 0}, 200)
.animate({opacity: 0.35}, 200)
There is a shorter alternative, using the extension jquery-timing:
Animate a given number of times:
$('#flash').repeat().animate({opacity:0.35}, 200)
.animate({opacity:0}, 200).until(10);
As endless loop:
$('#flash').repeat().animate({opacity:0.35},200).animate({opacity:0},200,$);
For details see the API of .repeat(), .until(count), and .animate(…,$).