Shaun Shaun - 1 year ago 154
jQuery Question

Fixed sidebar on scroll

I've attempted to set a sidebar as a fixed position when it hits the top of the screen and then when it reaches the footer at the bottom it gets removed. The problem is when the user scrolls back up it's not smooth and jumps back to the top.

Can someone look at this for me please and guide me to how to make it smoother?

Link to page:

Answer Source

It looks as though you're using Bootstrap, so why not use their built-in affix plugin?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download