|
Getting Started:
All WZ widgets act as jQuery Plugins. They work on the principle similar to 'Early Designing and Late Binding'.
The content inside the widgets can be rendered using HTML & text, so they are SEO-Friendly.
Please follow the steps below to see how the splitter works.
Step 1: Adding an external CSS link inside <head></head> tag, make sure that the virtual path is valid:
<link href="css/WZSplitter.css" type="text/css" rel="Stylesheet" />
Step 2: Referencing external JavaScript files inside <head></head> tag in order, make sure that the virtual path is valid:
<script language="javascript" type="text/javascript" src="scripts/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="scripts/WZCore.js"></script>
<script language="javascript" type="text/javascript" src="scripts/WZSplitter.js"></script>
Step 3: Formatting div tags and then applying proper class names to div tags like this:
<div class="WZSplitter" style="width:600px; height:360px;">
<div class="WZSplitterPanel"></div>
<div class="WZSplitterPanel"></div>
</div>
Initially you have to give width & height to fill the root splitter.
Now it works, please see this demo by click Demo 1.
Step 4: Adding hidden fields with class name 'WZSplitterConfig' or 'WZSplitterPanelConfig' and overriding default values to control their appearance separately.
This step is suitable for nested & complex layout. The splitter supports unlimited panels and unlimited nested splitters.
<div class="WZSplitter" style="width:800px; height:600px;">
<div class="WZSplitterPanel">
<input class="WZSplitterPanelConfig" type="hidden" value="size:25%; minSize:80; maxSize:300; showHeader:true; headerTitle:Left; headerIconUrl:images/_bird.png; miniPnlSize:20" />
</div>
<div class="WZSplitterPanel WZSplitter"> <!-- nested splitter -->
<input class="WZSplitterConfig" type="hidden" value="panelAlign:horizontal; indicatorWidth:8;" />
<input class="WZSplitterPanelConfig" type="hidden" value="size:50%;" />
<div class="WZSplitterPanel">
<input class="WZSplitterPanelConfig" type="hidden" value="showHeader:true; headerTitle:Center-Top; headerIconUrl:images/_cobra.png; miniPnlSize:20" />
</div>
<div class="WZSplitterPanel">
<input class="WZSplitterPanelConfig" type="hidden" value="showHeader:true; headerTitle:Center-Middle; headerIconUrl:images/_elephant.png; miniPnlSize:20" />
</div>
<div class="WZSplitterPanel">
<input class="WZSplitterPanelConfig" type="hidden" value="showHeader:true; headerTitle:Center-Bottom; headerIconUrl:images/_frog.png; miniPnlSize:20" />
</div>
</div>
<div class="WZSplitterPanel">
<input class="WZSplitterPanelConfig" type="hidden" value="size:25%; minSize:80; maxSize:300; showHeader:true; headerTitle:Right; headerIconUrl:images/_kangaroo.png; miniPnlSize:20" />
</div>
</div>
Please see this demo by click Demo 2.
The demo is just showing part of basic items, please go through documentation for more details.
Step 5: Creating a JavasScript block at the bottom of the <head></head> tag and then overwriting Global configuration settings to manipulate the splitters' behavior
such as animation speed, panel resize mode, changing skins etc.
<script language="javascript" type="text/javascript">
<!--
$_WZsp.Cfg.enableDefaultMode = false;
$_WZsp.Cfg.animateSpeed = "slow";
$_WZsp.Theme.skin('css/WZSplitter.css',"WZSplitterPurple");
-->
</script>
Please see the demo by click Demo 3.

| Parameter | Description |
|---|---|
| splitterIndex | Required, an integer starts from 0 indicating the index of the splitter. |
| panelIndex | Required, an integer starts from 0 indicating the panel's order inside its splitter. |
| [array parameters] | Optional, a user-customized array which contains the parameters for the following callback function. Example: ["Cat", 100, true] |
| callback | Required, a Javascript function or a function name which you have already defined. |
| Parameter | Description |
|---|---|
| cssVirtualPath | Required, a string linking to a CSS file. Default value: "css/WZSplitter.css" |
| skinName | Required, a string acting as the group prefix for a set of CSS rules. For example: "LightGray" |
-- arrowSolidBlack.gif;
-- arrowSolidBlackAnimation.gif
-- arrowHollowBlack.gif;
-- arrowHollowBlackAnimation.gif
-- arrowSolidWhite.gif;
-- arrowSolidWhiteAnimation.gif
-- arrowHollowWhite.gif;
-- arrowHollowWhiteAnimation.gif