$('#temp').jstree({
'core': {
'data': userInfo
},
"plugins": ["search"]
});
$(".search-input").keyup(function() {
var searchString = $(this).val();
console.log(searchString);
$('#temp').jstree('search', searchString);
});
Asked
Active
Viewed 206 times
0

Naresh Kumar P
- 4,127
- 2
- 16
- 33

Chetan
- 11
1 Answers
0
It should work. Are you sure you have the library loaded before running this script? Also use $('#temp').jstree().search(searchString);
.
Check demo - Fiddle Demo

Nikolay Ermakov
- 5,031
- 2
- 11
- 18
-
Hi Nikolay, thanks for the reply.... the library are not loading properly, can you tell me what is the issue?? – Chetan Feb 27 '17 at 04:43
-
If you know it doesn't load, you have to find out why. How do you link it to your page? Can you show your html? What are some errors you see in the browser console? – Nikolay Ermakov Feb 27 '17 at 05:03
-
-
this is my code and i have downloaded the JSTree from the NuGet Pakages... and sorry for the presentation of code because iam new to this forum... – Chetan Feb 27 '17 at 09:47
-
Did you include the jQuery javascript in this page? And then the jsTree javascript ? – Nikolay Ermakov Feb 27 '17 at 12:44
-
HI Nikolay, yea i have added those two JS files – Chetan Feb 28 '17 at 04:31