stickySidebar is a simple and usable jQuery plugin to make div sticky and useful for sticky sidebars that follow the user in scrolling and that can make the sidebar always visible when you scroll down the page.
How to make use of it:
1. Place the JavaScript stickySidebar.js
after loading the jQuery library.
<script src="/path/to/cdn/jquery.min.js"></script> <script src="/path/to/stickySidebar.js"></script>
2. Attach the function sticky sidebar to the sidebar component.
<aside id="sidebar"> <h3>Sidebar</h3> </aside>
$(function(){ $('#sidebar').stickySidebar(); });
3. Specify the distance between the sticky sidebar, often barely higher than the height of your sticky header.
$(function() { $( '#sidebar' ).stickySidebar({ topPadding: 100 }); });
4. Specify the duration of the animation.
$(function() { $( '#sidebar' ).stickySidebar({ animationDuration: 500 }); });
5. Increase the footerThreshold
worth to prevent the sticky component.
$(function() { $( '#sidebar' ).stickySidebar({ footerThreshold: 80 }); });
See Demo And Download
Official Website(tony-rowan): Click Here
This superior jQuery/javascript plugin is developed by tony-rowan. For extra Advanced Usage, please go to the official website.