you can modify css to flush it with the bottom of the screen by setting bottom : 0px for the .top selector
currently the element is actually part of the footer, so it would not be easy functionality to make it stop scrolling at some point on the page.
I assume that you will need to set the maximum scroll height variable in javascript, and when you achieve this scroll, get the offset of the element, change its position to absolute and set the position to the offset that you saved. if they are below the maximum scroll height, change the position to fixed.
source share