Stick div to top of parent div on scroll
<p>This is a variation of the question of sticking a <code>div</code> to the top of the page. Instead I need a div to stick to the top of its parent div, which has been set to <code>overflow: auto</code>.</p>

<p><a href="http://jsfiddle.net/7F22m/" rel="nofollow">http://jsfiddle.net/7F22m/</a>
(Code cobbled from <a href="http://stackoverflow.com/questions/7819842/make-div-stick-to-the-top-of-the-screen-and-stop-before-hitting-the-footer">here</a>.)</p>

<p><code>#sticky</code> should stick to the top of <code>#wrapper</code> once it reaches the top of <code>#wrapper</code>.</p>
