title: jQuery Animation: Moving objects
body: <p>This jquery code moves object top to bottom:</p>
  
  <pre><code>case
  'slideToTop':
    $a.data('t',$a.css('top'));
    $a.stop().animate({'top': $a.height()+20 + 'px'},300,function(){
    $a.css('top',0-$a.height()-20 + 'px');
    $curr.removeClass('sh').hide();
    $next.addClass('sh').show();
    $a.animate({'top': $a.data('t')},300); }); 
  break;
  </code></pre>
  
  <p>How would I change that to move object from bottom to top?</p>
  
  <p>I tried modifying these lines:</p>
  
  <pre><code>$a.stop().animate({'top': $a.height()+20 + 'px'},300,function()
  $a.css('top',0-$a.height()-20 + 'px');
  </code></pre>
  
  <p>To this: </p>
  
  <pre><code>$a.stop().animate({'top': 0-$a.height()-20 + 'px'},300,function(){
  $a.css('top',$a.height()+20 + 'px');
  </code></pre>
  
  <p>Didn't work. Does anyone know? Thanks!</p>