resizable splitting panes - Free Download Resizable Splitting Panes In jQuery - jsplitter

Free Download Resizable Splitting Panes In jQuery – jsplitter

Posted on

This time I will share jQuery Plugin and tutorial about Resizable Splitting Panes In jQuery – jsplitter, hope it will help you in programming stack.

resizable splitting panes - Free Download Resizable Splitting Panes In jQuery - jsplitter
File Size: 5.39 KB
Views Total: 325
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A JavaScript (jQuery) based splitter plugin that divides a container into two parts and allows the user to resize the left/right panes with mouse drag.

Useful in responsive web development that enables the developers to test how their web apps work on different screen sizes.

Alternatively, you can also use the jsplitter plugin to create a split layout that allows you to split a layout into multiple resizable areas.

How to use it:

1. Load jQuery library and the jsplitter plugin in the HTML page.

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

2. Add left/right content together with the splitter to your page.

01 <!-- Left Content -->
02 <div id="left">
03   Left Pane
04 </nav>
05  
06 <!-- Splitter -->
07 <div id="vsplitter"></div>
08  
09 <!-- Right Content -->
10 <div id="right">
11   Right Pane
12 </div>

3. Initialize the plugin to create a basic split layout.

1 $('#vsplitter').jSplitter({
2   'leftdiv': 'left',
3   'rightdiv': 'right'
4 })

4. Or wrap the resizable panes in a flexible container.

01 <div style="display:flex;">
02   <!-- Left Content -->
03   <div id="left">
04     Left Pane
05   </nav>
06  
07   <!-- Splitter -->
08   <div id="vsplitter"></div>
09  
10   <!-- Right Content -->
11   <div id="right">
12     Right Pane
13   </div>
14 </div>
1 $('#vsplitter').jSplitter({
2   'leftdiv': 'left',
3   'flex': true
4   ''
5 })

5. Determine the min/max width of the left pane.

1 $('#vsplitter').jSplitter({
2   'minleftwidth': 0,
3   'maxleftwidth': 20000,
4 })

6. Determine whether to persist the current position of the splitter using Cookies. Default: false.

1 $('#vsplitter').jSplitter({
2   'persist': false,
3   'cookie': 'jsplitter',
4 })