jquery animation to slide left and back
<p>I have the following jquery. What i am trying to do is when i scroll down my page pass 900px a div slides out from the left and when i scroll up pass 900px it slides left out of view. right now if slides out when i am at the bottom of the page and if i scroll back up it does not slide in. i just cant figure what i am doing wrong. i would really appreciate some direction.</p>

<pre><code>$(window).scroll(function() {               
   var content = $(window).scrollTop();
        if (content &lt; 950){
            $('.float-menu').animate({left: '-100px'},800);
            } else {
       if (content &gt; 950) {
           $('.float-menu').animate({left: '0px'},500);
       }

  }
</code></pre>

<p>});</p>