title: jquery animate() toggle without hiding the element
body: <p>Is there a way to toggle a single CSS property using the animate() function without hiding it?
  Something like this;</p>
  
  <pre><code>$(".block").animate({ 'border-width': 'toggle' }, 1000);
  </code></pre>
  
  <p>I cannot use the toggleClass(), addClass() or removeClass(). The reason for this is that it has an unwanted effect on the size of the element that is animated (see JSFiddle).</p>
  
  <p><a href="http://jsfiddle.net/danied/uabr42a0/" rel="nofollow">You can find a JSFiddle here.</a></p>
  
  <p>What I can think of is this;</p>
  
  <pre><code>if(parseInt($(".block").css('border-width'))) {
      $(".block").animate({ 'border-width': '0'});
  }
  else {
      $(".block").animate({ 'border-width': '100px'});
  }
  </code></pre>
  
  <p>..Or something like this by adding a class to the element. But I would prefer not to use an if statement. I wonder if this is possible in a single line of code. Feels like it should be.</p>