How To Build Multiple Stacking Sticky Sidebars | sticky block

Sticky Block is a lightweight and responsive jQuery plugin for creating a two-column layout with sidebars pinned into the document.

The sticky sidebar sticks to the top of the page inside the original section when scrolling until it reaches the next section.

How to make use of it:

1. Insert the jQuery library along with the sticky block plugin’s files into the HTML.

<link rel="stylesheet" href="/path/to/jquery-sticky-block.css" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/jquery-sticky-block"></script>

2. Create sticky blocks that include left & right columns and sticky sidebars as follows:

<!-- Sticky block starts here -->
<div id="sticky-block-1" class="sticky-block-wrapper">
  <div class="sticky-block-row">
    <!-- Column Left Starts here -->
    <div class="column-left">
      <!-- Content block sticky 1 starts -->
      <div class="content-block-left content-block-01 sticky">
        <h2>Sticky Block 1</h2>
      </div>
    <!-- Content block sticky 1 ends -->
    </div>
    <!-- Column Left Ends here -->
    <!-- Column Right Starts here -->
    <div class="column-right">
      <!-- Content block 1 starts -->
      <div class="content-block-right content-block-02">
        <h3>Main Content 1</h3>
        <p>Description 1</p>
      </div>
        <!-- Content block 10 ends -->
    </div>
        <!-- Column Right Ends here -->
  </div>
</div>
<div class="clearfix"></div>
<!-- Sticky block ends here -->

3. Call the function on the top container and the plugin will do the remaining.

$(function(){
  $('.sticky-block-wrapper').stickyBlock();
});

Sticky Sidebars In Two-Column Layout, jquery sticky block Plugin/Github


See Demo And Download

Official Website(debrajrakshit): Click Here

This superior jQuery/javascript plugin is developed by debrajrakshit. For extra Advanced Usages, please go to the official website.

Related Posts

Input-Values-Using-Mouse-Drag

Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API. Side Slider…

simple-parallax-scrolling-js

Smooth and Lightweight Parallax Scroll Library in Pure Javascript

Lightweight and seamless parallax scrolling library implemented in pure javascript using hardware acceleration for additional performance. Main Features Extremely lightweight with no dependencies A few kilobytes of pure…

Convert-Form-Data-to-JSON

How to Convert Form Data to JSON with HTML Forms | FormsJS

FormsJS is a simple-to-use JavaScript library that covers type subject values to JSON in real time. The items containing the data category will be analyzed automatically. It…

editable-html-table-using-javascript

A Small jQuery Extension to Convert An Editable HTML Table

Editable Table is a small jQuery extension to convert an editable HTML table for fast data entry and validation. A small jQuery extension to convert a static…

jquery.youtube-background

Simple jQuery Plugin for Embedding YouTube Videos As Cover Background

jquery.youtube-background is a jQuery plugin built to facilitate YouTube embeds as cover wallpaper using the YouTube Embed API. There is another jQuery Youtube Video Background plugin that…

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…