title: Animate absolute div to left:0 then to right:0 and loop
body: <p>Ok, I know how to animate div's and loop the animation and stuff but this really got on my nerves, I want to animate a div to <code>left:0;</code> and then to <code>right:0;</code> and loop the animation and IT WILL NOT WORK like this...Why is that?</p>
  
  <p>How do I do this?..</p>
  
  <p>PS: Apparently jquery can't animate an absolute container from left:0 to right:o...but how can I get the desired animation?</p>
  
  <p>Example:</p>
  
  <p>Something like this will not work...:</p>
  
  <pre><code>$(document).ready(function() {   
  function animateMydiv() {
  $('#mydiv').animate({'left':'0px'},6000).animate({'right':'0px'},6000, animateMydiv); 
  }
  
  animateMydiv();
  }); 
  </code></pre>
  
  <p><strong>Here is the <a href="http://jsfiddle.net/brilliancedisplay/bc927afp/" rel="nofollow">jsfiddle</a>.</strong></p>