Periodical

An example of periodical effects. You can stop and start it again.

var effect = $('box').effect('background-color', {duration: 800});
var periodical;
 
var fx = function() {
	effect.start('#6684a0').chain(function() {
		effect.start('#bcd965');
	});
}
 
$('start').addEvent('click', function() {
	fx();
	periodical = fx.periodical(1700);
});
 
$('stop').addEvent('click', function() {
	$clear(periodical);
});
<h3>Periodical Effects</h3>
<a id="start" href="#">start</a> | <a id="stop" href="#">stop</a>
 
<div id="box"></div>
#box {
	margin: 1em auto;
	width: 200px;
	height: 150px;
	background: #bcd965;
	border: 1px solid #000;
}

Periodical Effects

start | stop