Example #12: cyclic button clicks

The buttons can be clicked one after the other. At the end the cycle starts over and over.

Remark that the code is the same no matter how many buttons we have.

$('.example button').repeat().each($)
   .attr('disabled',false).one('click')
   .attr('disabled',true).until(false);

Other examples with closed loops

Other examples with each-loops

Other examples with inline attached events

Other examples with instant loops

Other examples with repeat-loops