title: 'Pulsing' a border in Javascript/JQuery
body: <p>I am in the process of applying validation on a web form  -one of the things I would like to do is add a pulsing border to the div which contains the erroneous input.</p>
  
  <p>This solution: <a href="https://stackoverflow.com/questions/4505262/border-highlighting-loop-with-jquery">border highlighting loop with jquery</a> and <a href="http://jsfiddle.net/Ue4wy/4/" rel="nofollow noreferrer">http://jsfiddle.net/Ue4wy/4/</a> pretty much hits the mark.</p>
  
  <p>But I want to be able to fade the yellow border to black on the click handler &amp; reset the loop (this example pauses the loop), so the next time the user hits submit it starts again.</p>
  
  <p>Reseting the colour to black works using the code below (though I am sure there is a more elegant solution), but how do I reset the loop?</p>
  
  <pre><code>    $('#weight').animate({
          borderBottomColor: '#000',
          borderLeftColor: '#000',
          borderRightColor: '#000',
          borderTopColor : '#000'
      }, 'fast' );
  </code></pre>
  
  <p>Any ideas appreciated!</p>