blob: e6519192e04952b6eec45da287630db15a4c86dc (
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
|
---
title: getNodeByCallback
name: functions-getnodebycallback
---
**function getNodeByCallback(callback);**
Get a tree node using a callback. The callback should return true if the node is found.
{% highlight js %}
var node = $('#tree1').tree(
'getNodeByCallback',
function(node) {
if (node.name == 'abc') {
// Node is found; return true
return true;
}
else {
// Node not found; continue searching
return false;
}
}
);
{% endhighlight %}
|