blob: 266aad7ac54e722c2823d4630c44c9fb60565f49 (
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
|
---
title: Load json data from the server in javascript tree
layout: page
js: examples/load_json_data_from_server.js
css: example.css
---
<p id="nav">
<a href="../01_load_json_data/">« Example 1</a>
<a href="../03_drag_and_drop/" class="next">Example 3 »</a>
</p>
<h1>Example 2 - load json data from the server</h1>
<div id="tree1" data-url="/example_data/"></div>
<p>
In this example we load the data from the server using the <strong>data-url</strong> property on the dom element.
</p>
<h3>html</h3>
{% highlight html %}
<div id="tree1" data-url="/example_data/"></div>
{% endhighlight %}
<h3>javascript</h3>
{% highlight js %}
$('#tree1').tree();
{% endhighlight %}
|