title: jQuery Draggable containment visible window?
body: <p>I'm trying to contain my draggable element so it cannot be dragged outside of the viewable window, which works well if the user is at the top of the page, however if you scroll down at all then it messes it all up.</p>
  
  <p>How can I do this?</p>
  
  <pre><code>$(".chat-wrapper &gt; li.draggable").draggable({ 
   greedy: true, 
   handle: '.chat-button', 
   containment: 'html'
   });
  </code></pre>