ユーザーが div を超えてスクロールするときは、css を position:fixed に変更する必要があります。ここで行われていることとよく似ています: http://imakewebthings.com/jquery-waypoints/shortcuts/sticky-elements/ただし、プラグインなしで単純な jquery を使用します。
ユーザーが別の div にスクロールしたら、div のスクロールも停止する必要があります。
例えば:
<div id="stuff"></div>
<div id="this"></div>//must start scrolling with user when user reaches it.
<div id="footer"></div>// when #this reaches within say, 10px, of #footer it must stop in it's current position, in order to prevent overlap
私は .scroll()
and.css()
を使用すると仮定していますが、そこからどこへ行くべきかわかりません。