0

Possible Duplicate:
Stopping fixed position scrolling at a certain point?

After I scroll past a certain point I need an element (side bar of links) to not scroll anymore, but yet just stay where it is. I have tried setting this element to fixed after the certain point and this works fine other than it snaps the side bar links down into view in the window in the same position they were before i started scrolling and then fixes them to the window where they do not scroll anymore. I would like to not see this instead once i scroll past the certain point just leave the element where it is on the page, but do not allow it to be scrolled anymore (therefore my side bar of links will be slightly scrolled up off the page, but the bottom links still showing) . triggering the event of setting the element to fixed or not fixed is not my problem that works fine. I just need to position the element AFTER setting it to fixed so that i can put it back up where it started, or find and alternate to setting the position to fixed after I scroll past this certain point.

again desired behavior is that once i scroll down so far on my page, my side bar of links just stay where they are (partly scrolled down, which means the top part is off the page) and then as i continue to scroll down they do not move.

most likely i am thinking i need to reposition the links after the position is being changed to fixed.

ANY HELP? THANKS!

Community
  • 1
  • 1
  • no, i can scroll to where i set it to fixed and set it to fixed, then i can scroll up and set it back from not being fixed. that is not my problem. triggering the event at the right place and "fixing" the element i can do. the behavior i am getting from setting the element to fixed is what i have a question about, if i can handle the behavior or use something else besides setting position fixed. I was the element to stop scrolling, but still stay where it was after i scrolled past the point where i change the element to fixed. once i hit that point the element is jumped down then becomes fixed – OnlyHereToHopefullyHelp Jul 18 '12 at 21:13

1 Answers1

1

yes. There is a nifty little jquery plugin that handles this: https://github.com/bigspotteddog/ScrollToFixed

or you can reference this previous post dealing with the same subject matter: Stopping fixed position scrolling at a certain point?

Community
  • 1
  • 1
DOCbrand
  • 339
  • 1
  • 6
  • not working well for me at all. it is extending my scrollbar, and making the text that is scrolling up behind my header show up above the header once it should be scrolled up out of view. – OnlyHereToHopefullyHelp Jul 18 '12 at 21:09
  • You'll need to tweak it to make it work properly. It took me a few hours to make it work the way I wanted to when I implemented it. I'm just here to lead you in a direction that you could take, sorry if it isn't working for you right off the bat or if you don't want to take the time! – DOCbrand Jul 18 '12 at 21:13