How to create Sticky Sidebar


Is it really cool that the Sidebar of our site or our blog follows as we scroll down the page. There are lots of ways we can do it but what I do here is using a jQuery plugin for making sticky element.

Sticky-Kit provides us an easy way to make elements or div on our site to be sticky whenever we scroll our page.

First we should download it and install on our site.

Download Sticky-kit here

To install include jquery.sticky-kit.js after including your jQuery.

Just call stick_in_parent function on the elements you want to be stick inside of their parent div.


you can also visit their site for more reference. Thanks to the creator of the plugin it makes our live easier.

See it in action:

See the Pen Sticky Sidebar by DrewCodeSpot (@drewcodespot) on CodePen.