Queueing setTimeout in javascript
<p>I need to flash an element off and on. This works but I don't really like the code. Is there a nice way of doing this?</p>

<pre><code>setTimeout(function(){
  toggle();
  setTimeout(function(){
    toggle();
    setTimeout(function(){
      toggle();
      setTimeout(function(){
        toggle();
      }, 100);
    }, 100);
  }, 100);
}, 100);
</code></pre>

<p>I'm using jQuery too if that helps.</p>
