Getting Started

jqxDockingLayout represents a jQuery widget which allows the creation of complex layouts with panels that can be floated, docked, nested, resized, pinned, unpinned and closed.
Every UI widget from jQWidgets toolkit needs its JavaScript files to be included in order to work properly.

The first step is to create html page and add links to the javascript files and css dependencies to your project. The jqxDockingLayout widget requires the following files:


The next step is to create a DIV element within the body of the html document and add a div for each of the docking layout's panels with the panel's content in it. The div structure can be flat and does not have to correspond to the panels' hierarchy. Each div has to have its data-container attribute set to a value which will later be referenced in the layout array in the JavaScript code.

The last step is to initialize the widget by adding the following script to the html document:

To call a function(method), you need to pass the method name and parameters(if any) in the jqxDockingLayout’s constructor.
$("#jqxDockingLayout").jqxDockingLayout("destroy");
    
To set a property(option), you need to pass the property name and value(s) in the jqxDockingLayout's constructor.
$("#jqxDockingLayout").jqxDockingLayout({ rtl: true });
    
To get a property(option), you need to pass the property name to the jqxDockingLayout's constructor.
var width = $("#jqxDockingLayout").jqxDockingLayout("width");
    
To bind to an event of a UI widget, you can use basic jQuery syntax. The example code below demonstrates how to bind to the "resize" event of jqxDockingLayout.
// bind to resize event.
$('#jqxDockingLayout').on('resize', function () {
    alert('A panel group has been resized.');
});
    

Basic Sample

The result of the above code is: