I know you can do this with fixed position in CSS but I really liked it..That is why I have added it to my portfolio. When you scroll down, that element is just chasing you up and down very smoothly with a bit of a delay. Sweet! The code is very simple too. All you have to do to make it work for you is change #sidebar with your own element. The code executes every time the user scrolls up or down the page. It stops the element from any kind of animation and adds new animation which makes it go to a certain position with a bit of a delay. You can change the speed by changing “slow” to “fast” or do numbers. Copy the code and give it a go!

If you find my blogging useful, please share it.