1 <div class="apiDetail">
\r
3 <h2><span>JSON / Function(treeId, treeNode)</span><span class="path">setting.view.</span>fontCss</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>Personalized text style, only applies to <A> object in the node DOM</p>
\r
12 <h3>JSON Format</h3>
\r
14 <p>As same as .css() method in jQuery. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
\r
16 <h3>Function Parameter Descriptions</h3>
\r
18 <h4><b>treeId</b><span>String</span></h4>
\r
19 <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>
\r
20 <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
\r
21 <p>JSON data object of the node which use the personalized text style</p>
\r
22 <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
\r
23 <p>Return value is same as 'JSON Format'. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
\r
25 <h3>Examples of setting & function</h3>
\r
26 <h4>1. Don't modify css file, and set the node name's color to red</h4>
\r
27 <pre xmlns=""><code>var setting = {
\r
29 fontCss : {color:"red"}
\r
32 <h4>2. Don't modify css file, and set the root node name's color to red</h4>
\r
33 <pre xmlns=""><code>function setFontCss(treeId, treeNode) {
\r
34 return treeNode.level == 0 ? {color:"red"} : {};
\r