title: D3.js: run a transition continuously?
body: <p>How can I run a transition continuously in D3.js?</p>
  
  <p>For example, say I want to change the <code>body</code> colour from red to blue and back again, continuously (I don't, that would be horrendous, but go with it).</p>
  
  <p>This is how I would do it once:</p>
  
  <pre><code>d3.select("body").transition().duration(1000).style("background-color", "red");
  </code></pre>
  
  <p>How would I do it continuously?</p>
  
  <p>The closest examples I have seen use <code>d3.timer</code>, but I am not sure if there is a better way to do it. </p>