Use CSS and change the class name in Javascript. So say your nodes are div. When you find node, in Javascript you will do something like:
divFoundNode.className = "selected";
Then make sure your CSS has the selected class with the background color set. It will look something like this:
.selected {background-color:red;}
CSS, node, - :
divFoundNode.style.backgroundColor = "red";
, , , . node. . (, ), Javascript div . , - :
var divLastFoundNode;
function treeView_SelectNode(divFoundNode)
{
divLastFoundNode.className = "";
divFoundNode.className = "selected";
divLastFoundNode = divFoundNode;
}
JQuery . . :
$("div.node").removeClass("selected");
$(divFoundNode).addClass("selected");