summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE/client/bower_components/jqTree/_examples/06_autoescape.html
blob: 308d56a09eb08db83d890d3de99d9f15e87f19b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: Javascript tree with autoescape
layout: page
js: examples/autoescape.js
css: example.css
---

<p id="nav">
    <a href="../05_load_on_demand/">&laquo; Example 5</a>
    <a href="../07_autoscroll/" class="next">Example 7 &raquo;</a>
</p>

<h1>Example 6 - autoEscape</h1>

<p>
    You can put html in the node titles setting the <a href="../index.html#tree-options-autoescape">autoEscape</a> option to <strong>false</strong>.
</p>

<div id="tree1"></div>

<h3>html</h3>

{% highlight html %}
<div id="tree1"></div>
{% endhighlight %}

<h3>javascript</h3>

{% highlight js %}
var data = [
  {
    label: 'examples',
      children: [
        { name: '<a href="example1.html">Example 1</a>' },
        { name: '<a href="example2.html">Example 2</a>' },
        '<a href="example3.html">Example </a>'
      ]
  }
];

// set autoEscape to false
$('#tree1').tree({
  data: data,
  autoEscape: false,
  autoOpen: true
});
{% endhighlight %}