http://www.devbridge.com/projects/autocomplete/jquery/
The sidebar on the left initially prints lower down the page, but when you scroll it moves up to the top and then stays instead of disappearing beyond the top of the viewport. I’ve seen this a lot.
You might want to take a look at the sticky.js jQuery plugin.
It handles such things quite nicely if you do not need it too fancy.
The principle behind it is to check for scrolling in the container of an element.
It gets fixed once it reaches a certain scroll level.