0

I have a side bar like on this demo, that starts at a certain position on the page and as you scroll down it bounces a long with that position. I'd like something like that but without the bouncing.

http://blog.echoenduring.com/wp-content/uploads/demos/echo_ContainedStickyScroll/

The closest I have come are the other scroll to fixed position questions but I don't want my div to have to hit the top of the page to become fixed. How do I do this?

  • 1
    You should post sample code here (HTML, JS, whatever is relevant) as well as any code samples of what you have already tried. Links to JSFiddle, etc are also helpful. – Gary Storey Oct 30 '14 at 18:21

1 Answers1

0

Check the scroll of the page :

if($(window).scrollTop() < somePosition) {
    $("mydiv").css("position","fixed");

}
Mathieu Labrie Parent
  • 2,598
  • 1
  • 9
  • 10