How to make a div not scroll off the page using jquery -
basically have structure this:
<body> <div> main content </div> <div> toolbar </div> <div> results </div>
when scrolling down, want "main content" disappear off screen. 'toolbar' stay flush top of page, , 'results' scroll, disappearing 'toolbar' scroll.
edit: toolbar starts off in middle of screen. want scroll top, no further, rest of page (below) keeps scrolling.
i found tutorial http://www.wduffy.co.uk/blog/keep-element-in-view-while-scrolling-using-jquery/
but different. in example above, although toolbar stays near top, prevents results being scrolled.
i have position:fixed; toolbar. way stay fixed in view.
<body> <div> main content </div> <div style="position:fixed;"> toolbar </div> <div> results </div>
Comments
Post a Comment