title: Jquery toggle on custom animation
body: <p>I have this animation which I'd like to trigger upon click of a link. When I run the animations separately, it's working fine. But using the jquery <code>toggle()</code>, it doesn't work anymore. Can anyone easily see why?</p>
  
  <p>Without <code>toggle()</code> it works (ran each separately):</p>
  
  <pre><code>$('#sign-in-fx').click(function() {
      $('.login_form').animate({ width: '273' }, 'slow', 'easeInOutQuart');
      //$('.login_form').animate({ width: '1' }, 'slow', 'easeInOutQuart');
  });
  </code></pre>
  
  <p>With <code>toggle()</code> nothing happens:</p>
  
  <pre><code>$('#sign-in-fx').click(function() {
      $('.login_form').toggle(
          function() {
              $(this).animate({ width: '273' }, 'slow', 'easeInOutQuart')
          },
          function() {
              $(this).animate({ width: '1' }, 'slow', 'easeInOutQuart')
          }
      );
  });
  </code></pre>
  
  <p>This is similar to <a href="https://stackoverflow.com/questions/931113/jquery-toggle-animation">jQuery toggle animation</a></p>