Change default jstree search color and error if not found in node list

I am using jstree plugin to find nodes. It works and when detecting defaul color it is very bright bluish color. How do you apply the default color to something else.

Also, if no search text is found, I would like to be able to display the error to users. Any ideas how I would go about this?

function myFunction()
{
$(document).ready(function(){

var value=document.getElementById("search_field").value; 

    $("#search_tree").click(function () { 

        $("#tree").jstree("search",value) 
 }); 

 }); 
}

      

This is my function that returns if it finds text in a node list.

I would like to raise a node with a dark blue color and also move the window to that node (sometimes three, maybe too large and the browser window needs to be adjusted to see the selected node). Very new to this type of scripting language and appreciates any input. Thank.

+3


source to share


1 answer


To change the color, you just need to edit line 45 of the theme CSS file:

.jstree-default a.jstree-search { color:aqua; }

      



Change aqua

to whatever you like.

+9


source







All Articles