title: Pulsating colors in javascript
body: <p>I'd like to have some text pulsate between red and black.  Figured I'd use <a href="http://jqueryui.com/demos/animate/" rel="noreferrer">jQuery UI's animate function</a> to do so.  Seems simple enough... something like:</p>
  
  <pre><code>function pulseRed() {
      $('.pulsing').animate({ color: "red" }, 1000, pulseBlack);
  }
  function pulseBlack() {
      $('.pulsing').animate({ color: "black" }, 1000, pulseRed);
  });
  </code></pre>
  
  <p>My concern is how efficient this is.  If I have a lot of text in different places to pulsate, should I instead somehow alter the CSS stylesheet rule for <code>.pulsing</code>?  Is it safe to have an infinite loop between functions like that or am I going to get in trouble for stacking too many function calls?</p>
  
  <p>I'm already using jQuery and jQuery UI, so I don't mind at all using the animate color mechanism above... but if there's a better solution I'd love to hear it.</p>