Create Smooth Collapsible Boxes Using jQuery - Box.js

File Size: 12.4 KB
Views Total: 1694
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Create Smooth Collapsible Boxes Using jQuery - Box.js

Box.js is a lightweight and easy-to-use jQuery plugin used to toggle (expand and collapse) block elements with a smooth sliding animation.

How to use it:

1. Add the jQuery box.js script and other required resources into the html page.

<link rel="stylesheet" href="box.min.css">
<script src="/path/to/jquery.min.js"></script>
<script src="dist/box.min.js"></script>

2. Create header, body and footer content for the collapsible box.

<div class="box" data-box>

  <div class="box-header" data-box-collapse-toggle>
    <span class="box-header-title box-header-title--padding">
      Header content here

  <div data-box-collapse-content>
    <div class="box-body box-body--padding">
        Main content here

    <div class="box-footer">
      Footer content here

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


Change log:


  • Added class to enable horizontal scroll
  • Fixed scroll class

This awesome jQuery plugin is developed by eumatheusgomes. For more Advanced Usages, please check the demo page or visit the official website.