Draggable Divider Bar (DDBar) Javascript Package
User Guide

Draggable Divider Bar(DDBar) Package User Gudie

To use DDBar package, you need the following two lines to include its CSS and js files inside the head part of your web page like:

<head>
...... 
<link rel="stylesheet" href="css/ddbar.css" type="text/css" /link>    
<script type="text/javascript" src="js/ddbar.js" /script>
......     
</head>

The ddbar.js file has been compressed to a much smaller version ddbar_min.js. The version requires character set iso-8859-1. For small foot print, DDBar source file ddbar.js can be replaced with ddbar_min.js and so the following three lines can replace the previous two lines:

<head>
...... 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/ddbar.css" type="text/css" /link>   
<script type="text/javascript" src="js/ddbar_min.js" /script>
......     
</head>

DDBar package has two functions: divideV and divideH, responsible for the creation of vertical and horizontal draggable divider bars, respectively. They both have the last argument to receive a setting object containing a collection of options for the divider bar and partition elements. In your javascript codes, you create divider bars by calling these functions. The next line will vertically divide element with id='area' into two partition elements with id='left' and id='right'.

DDBar.divideV('area','left','right');
With the next two lines, you can further vertically divide element with id='left' into two partition elements with id='left1' and id='right1' and horizontally divide element with id='right' into two partition elements with id='rightTop' and id='rightBottom'.
DDBar.divideV('left','left1','right1');
DDBar.divideH('right','rightTop','rightBottom');

RESIZE Event

DDBar package create divider bar to divide html element into two partition elements and the created divider bar can be dragged to resize the partition elements. When a divider bar resizes its two partition elements, DDBar codes will raise RESIZE event to both partition elements. You can listen to RESIZE event by assigning your event handler function to partition element's onresize attribute.

Multiple divider bars can be nested on a web page, When a divider bar resizes a partition element and the partition element is further divided into sub- partition elements. The sub-partition element might also receive RESIZE event since its size could be changed at the same time.

Function: DDBar.divideV

create a vertical divider bar to divide a html element into two partitions: left element and right element.

DDBar.divideV(parentElementId,leftElementId,rightElementId,vSettings);

Function: DDBar.divideH

create a horizontal divider bar to divide a html element into two partitions: top element and bottom element.

DDBar.divideH(parentElementId,topElementId,bottomElementId,hSettings);