Lightweight Customizable jQuery Split Layout Plugin flexLayout - Download Lightweight Customizable jQuery Split Layout Plugin - flexLayout

Download Lightweight Customizable jQuery Split Layout Plugin – flexLayout

Posted on

This time I will share jQuery Plugin and tutorial about Lightweight Customizable jQuery Split Layout Plugin – flexLayout, hope it will help you in programming stack.

Lightweight Customizable jQuery Split Layout Plugin flexLayout - Download Lightweight Customizable jQuery Split Layout Plugin - flexLayout
File Size: 1.44 MB
Views Total: 2704
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

flexLayout is a lightweight and highly customizable jQuery plugin used for generating a horizontal or vertical split layout with any number of resizable content sections. Heavily based on CSS3 flexbox mode. A great alternative to the legacy frame element.

Basic usage:

1. Place jQuery library and the jQuery flexLayout plugin’ script at the bottom of the webpage.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="flexlayout.js"></script>

2. Config the split layout using JavaScript arrays as follow:

01 var layoutConfig = [
02  
03     // block1:block2:block3 = 1:2:3
04     ['1', '2', '3'],
05  
06     // block1 = 100px
07     // block2:block3 = 1:3
08     ['100px', '1', '3']
09      
10 ];

3. Render the split layout inside a specified container.

1 $('.container').flexlayout(layoutConfig);

4. Pass the following options as the second parameter to the flexlayout() function.

01 $('.container').flexlayout(layoutConfig,{
02  
03   /*defines the height of the requesting element; '...string...'*/
04   height: '100%',
05  
06   /*defines the width of the requesting element '...string...'*/
07   width: '100%',
08  
09   /*defines the direction of the layout; 'h', 'v' or ['h', 'v', 'v', ...]*/
10   dir: 'h',
11  
12   /*defines whether the width/height of created blocks can be adjusted or not, boolean or [boolean, boolean]*/
13   adjust: false,
14  
15   /*defines the style of divide bars between created blocks, {...css object}, '...string of class name...', boolean or [..., ..., ..., ...]*/
16   bars: {flex: '0 0 1px', 'background-color': '#DEDEDE'}
17  
18 });

Change log:

2017-03-04

  • fixed cached bars, cannot be found bug;

2017-03-02

  • v0.3.1

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

source : jqueryscript.net