title: how to animate from left to right?
body: <p><a href="http://jsfiddle.net/J53cg/" rel="nofollow">demo</a>: This animates from right to left movement.But I need to use this animation from <strong>left to right</strong>.</p>
  
  <p>Basically, I'm using this script:</p>
  
  <pre><code>    var counter = 1;
          var thisw = $('.btn.close').parent().outerWidth();
          var thish = $('.btn.close').parent().outerHeight();
          $('.btn.close').on('click',function(){
              counter = !counter;
              if(counter){
              $(this).parent().animate({width: '5em', height: '2em'},1000);
              } else{
                  $(this).parent().animate({width: thisw, height: thish}, 1000);
              }
          }).click();//click trigger is added because on first click it doesn't animate
  //the reason is it is not getting actual width and height value as it is set in em but with jquery we get px value.
  </code></pre>
  
  <p>I even think my script can be written as better than this something like using ternary operator. But I'm stacked on this.</p>
  
  <p><strong>Question:</strong> </p>
  
  <ol>
  <li>So what's the better way to write jquery of the above code?</li>
  <li>Is it possible to animate from left to right without using position absolute?</li>
  </ol>