<p>zTree v3.x specifically provide the method which can use the tree's Id to get zTree object.</p>
<p>zTree v3.x provides this method to get zTree object from the tree's Id.</p>
<pclass="highlight_red">Please initialize zTree first, then you can use this method.</p>
<pclass="highlight_red">Please initialize zTree first, then you can use this method.</p>
<p>Users don't need to set the global variable to hold the zTree object, and all of the callback will return 'treeId' parameters, the user can always use this method to get the zTree object.</p>
<p>Users don't need to use a global variable to reference the zTree object,
as all of the callback methods will pass 'treeId' parameters,
and you can always call this method to get the zTree object.</p>
<p>1. The web page need to use W3C markup. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p>
<p>1. The web page must use the W3C DTD. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p>
<p>2. Need to load jquery-1.4.2.js or other higher versions.</p>
<p>2. Needs jquery-1.4.2.js or better.</p>
<p>3. Need to load jquery-ztree.core-3.0.js. If you need to use the edit mode or checkbox / radio mode, you need to load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.</p>
<p>3. Needs jquery-ztree.core-3.0.js or better.
<p>4. Need to load zTreeStyle.css and image files</p>
If you are using edit mode or checkbox / radio mode,
<p>5. If you need to use custom icons, please refer to the appropriate Demo.</p>
make sure you load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.</p>
<p>6. Note: You need to set zTree container's class name to "ztree". If you need to change, don't forget to modify the css file. If you need other special styles, can modify the css file to their own needs.</p>
<p>4. Needs zTreeStyle.css and image files</p>
<p>5. If you plan to use custom icons, please refer to the Demo,
or see the help on iconSkin.</p>
<p>6. Note: You need to set zTree container's class name to "ztree".
If you need to change it, don't forget to modify the css file.
If you need other special styles, you can modify the css file.</p>
</div>
</div>
</div>
</div>
<h3>Function Parameter Descriptions</h3>
<h3>Function Parameter Descriptions</h3>
...
@@ -22,9 +27,10 @@
...
@@ -22,9 +27,10 @@
<p>zTree's configuration data, please refer to "setting details" in the API Document.</p>
<p>zTree's configuration data, please refer to "setting details" in the API Document.</p>
<p>Required automatically submit the parameters about the properties of the parent node, when the asynchronous load. It is valid when <spanclass="highlight_red">[setting.async.enable = true]</span></p>
<p>During asynchronous loading, a request is sent to the server, which contains the identify of the parent node,
so it can retrieve the children.
This attribute is an array of strings, which is the identity parameter (or parameters).
It applies when <spanclass="highlight_red">[setting.async.enable = true]</span></p>
<p>Default:[ ]</p>
<p>Default:[ ]</p>
</div>
</div>
</div>
</div>
<h3>Array(String) Format</h3>
<h3>Array(String) Format</h3>
<divclass="desc">
<divclass="desc">
<p>1. Just save the attribute name of node to the array. For example: ["id", "name"]</p>
<p>1. Put the attribute name(s) of node to the array. For example: ["id", "name"]</p>
<p>2. You can change the parameter name. For example: server only accepts "zId" -- ["id=zId"]</p>
<p>2. You can rename the parameter name as sent to the server. For example: server only accepts "zId" -- ["id=zId"]</p>
</div>
</div>
<h3>Examples of setting</h3>
<h3>Examples of setting</h3>
<h4>1. set auto commit 'id' attribute</h4>
<h4>1. set auto commit 'id' attribute</h4>
...
@@ -23,9 +26,9 @@
...
@@ -23,9 +26,9 @@
autoParam: ["id"]
autoParam: ["id"]
}
}
};
};
If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: id=1
If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: id=1
......</code></pre>
......</code></pre>
<h4>2. set auto commit 'id' attribute, but parameter name is 'zId'</h4>
<h4>2. set auto commit 'id' attribute, but the parameter name expected by the server is 'zId'</h4>
<prexmlns=""><code>var setting = {
<prexmlns=""><code>var setting = {
async: {
async: {
enable: true,
enable: true,
...
@@ -33,7 +36,7 @@ If have the parent node: {id:1, name:"test"}, When asynchronously load this pare
...
@@ -33,7 +36,7 @@ If have the parent node: {id:1, name:"test"}, When asynchronously load this pare
autoParam: ["id=zId"]
autoParam: ["id=zId"]
}
}
};
};
If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: zId=1
If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: zId=1