title: Help with Scroll/Follow Sidebar
body: <p>used the jquery technique to have a scrolling/following sidebar from css-tricks.com, here is the code if you dont know what im talking about:</p>
  
  <pre><code>$(function() {
  
          var $sidebar   = $("#scroll-menu"),
              $window    = $(window),
              offset     = $sidebar.offset(),
              topPadding = 15;
  
          $window.scroll(function() {
              if ($window.scrollTop() &gt; offset.top) {
                  $sidebar.stop().animate({
                      marginTop: $window.scrollTop() - offset.top + topPadding
                  });
              } else {
                  $sidebar.stop().animate({
                      marginTop: 0
                  });
              }
          });
  
      });
  </code></pre>
  
  <p>also here is the link <a href="http://css-tricks.com/scrollfollow-sidebar/" rel="nofollow">http://css-tricks.com/scrollfollow-sidebar/</a></p>
  
  <p>The only problem that i have with this is that it has an container but when you scroll far enough into footer the sidebar scrolls out of container. Is there a way i can constrain how far it scrolls down?</p>
  
  <p>Here is an image of what is happening:
  <a href="http://tinypic.com/r/2mcj2mv/7" rel="nofollow">http://tinypic.com/r/2mcj2mv/7</a></p>
  
  <p>Thanks in advance</p>