minimal sticky sidebar - Free Download Minimal Sticky Sidebar Using jQuery

Free Download Minimal Sticky Sidebar Using jQuery

Posted on

This time I will share jQuery Plugin and tutorial about Minimal Sticky Sidebar Using jQuery, hope it will help you in programming stack.

minimal sticky sidebar - Free Download Minimal Sticky Sidebar Using jQuery
File Size: 4.13 KB
Views Total: 121
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

An ultra-small jQuery sticky sidebar plugin that can make the sidebar always visible when scrolling down the page.

How to use it:

1. Place the JavaScript stickySidebar.js after loading the latest jQuery library.

1 <script src="/path/to/cdn/jquery.min.js"></script>
2 <script src="/path/to/stickySidebar.js"></script>

2. Attach the function stickySidebar to the sidebar element and the plugin will take care of the rest.

1 <aside id="sidebar">
2   <h3>Sidebar</h3>
3 </aside>
1 $(function(){
2   $('#sidebar').stickySidebar();
3 });

3. Specify the distance between the sticky sidebar and the top of the page, usually slightly higher than the height of your sticky header. Default: 50.

1 $(function() {
2   $( '#sidebar' ).stickySidebar({
3     topPadding: 100
4   });
5 });

4. Specify the duration of the animation. Default: 300.

1 $(function() {
2   $( '#sidebar' ).stickySidebar({
3     animationDuration: 500
4   });
5 });

5. Increase the footerThreshold value to prevent the sticky element from pushing your footer element down. Default: 50.

1 $(function() {
2   $( '#sidebar' ).stickySidebar({
3     footerThreshold: 80
4   });
5 });