The Situation:
I have a pretty regular sidebar on my website.
As the last element in the sidebar you can see the Blogroll.
Below this I need to create a similar container which only contains a scroll-to-top button.
Pretty easy so far.
The Problem:
I need the Button to behave the following way:
If you scroll down and this container (only this) approaches the upper edge of the visible area I need it to stay there (position:fixed?) and move down with you. (With a little offset to the top)
If the you scroll up again it moves up with you. But it has to stop when it gets to its old position.
It needs to stop before the footer begins.
How far am I?
I know a bit of jquery but am no master.
Is such a thing actually possible?
I am happy to attach special classes to the container to make it work. At the moment I am just not sure how to approach this.
Any Ideas?