Can someone help with this jsfiddle?
Intended purpose: when the page is scrolled down, link expands in the view port, This works good. But as we scroll up, I would like the expand window to stop where it started. ie, below the header div. Right now, the position:fixed is causing it to remain at top even after the header div becomes visible.
some help with position:fixed
If I understand what you’re trying to do, I think you want to check for when scrollTop is less than the original position of
#expand. In particular:In the
scrollhandler:Resulting in this: http://jsfiddle.net/4Ns44/3/
This is if I understand what you’re trying to do…