1 <div class="apiDetail">
\r
3 <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showTitle</h2>
\r
4 <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
\r
7 <div class="longdesc">
\r
8 <p>Set to show or hide the 'title' attribute of node DOM.</p>
\r
9 <p class="highlight_red">Please see the <span class="highlight_red">setting.data.key.title</span> attribute</p>
\r
10 <p>Default: true</p>
\r
13 <h3>Boolean Format</h3>
\r
15 <p> true means: show the 'title' attribute of node DOM.</p>
\r
16 <p> false means: hide the 'title' attribute of node DOM.</p>
\r
17 <p class="highlight_red">When setting.view.showTitle = true & setting.data.key.title = '', zTree will set the 'setting.data.key.name' attribute to the 'setting.data.key.title'.</p>
\r
19 <h3>Function Parameter Descriptions</h3>
\r
21 <h4><b>treeId</b><span>String</span></h4>
\r
22 <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
\r
23 <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
\r
24 <p>JSON data object of the node which need to show title.</p>
\r
25 <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
\r
26 <p>Return value is same as 'Boolean Format'</p>
\r
28 <h3>Examples of setting & function</h3>
\r
29 <h4>1. Hide the 'title' attribute of node DOM.</h4>
\r
30 <pre xmlns=""><code>var setting = {
\r
36 <h4>2. Hide the 'title' attribute of node DOM which level=2.</h4>
\r
37 <pre xmlns=""><code>function showTitleForTree(treeId, treeNode) {
\r
38 return treeNode.level != 2;
\r
42 showTitle: showTitleForTree
\r