Can I check if jsTree serach yields some results?
for example, can I do something like that:
var searchResult = $('#m开发者_如何学CyTree').jstree('search', 'keyword');
if(searchResult.haveResults){
Do something...
};
Finally I found some solution:
var searchResult = $('#myTree').jstree('search', 'keyword');
if ($(searchResult).find('.jstree-search').length == 0) {
//Do something...
};
.jstree-search is the css class which stick to results nodes.
精彩评论