nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components / jqTree / _entries / 41_getnodebycallback.md
1 ---
2 title: getNodeByCallback
3 name: functions-getnodebycallback
4 ---
5
6 **function getNodeByCallback(callback);**
7
8 Get a tree node using a callback. The callback should return true if the node is found.
9
10 {% highlight js %}
11 var node = $('#tree1').tree(
12   'getNodeByCallback',
13   function(node) {
14       if (node.name == 'abc') {
15           // Node is found; return true
16           return true;
17       }
18       else {
19           // Node not found; continue searching
20           return false;
21       }
22   }
23 );
24 {% endhighlight %}