forked from travist/jquery.treeselect.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtreeselect.html
34 lines (34 loc) · 839 Bytes
/
treeselect.html
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
<script type='text/javascript'>
jQuery(function() {
$('div.chosentree').chosentree({
width: 500,
deepLoad: true,
showtree: true,
load: function(node, callback) {
setTimeout(function() {
callback(loadChildren(node, 0));
}, 1000);
}
});
});
</script>
<div class="chosentree"></div>
<h2>Usage</h2>
<pre><code>
<script type='text/javascript'>
jQuery(function() {
$('div.chosentree').chosentree({
width: 500,
deepLoad: true,
load: function(node, callback) {
/**
* This would typically call jQuery.ajax to load a new node
* on your server where you would return the tree structure
* for the provided node.
*/
}
});
});
</script>
<div class="chosentree"></div>
</code></pre>