I'm having problem with my jquery tree view. now I'm using this : http://struts.jgeppert.com/struts2-jquery-showcase/index.action
I want to make the css background on selected tree node after the node is clicked. How should I do, pls give me some idea? The css effect displays when handover on tree node but, after clicked, the css effect does not show.
I added this <sj:head jqueryui="true" jquerytheme="showcase" />
in head tag
, added the following code in script
$(function(){
$.subscribe('treeClicked', function (event, data){
alert("treeClicked");// check if script called on page load
//Get the next item, this is the tree node object is selected, many operations need it
var item = event.originalEvent.data.rslt.obj;
//For example, we want to select the node id suggest, you can write like this
alert ('Clicked ID : ' + item.attr ("id"));
document.getElementById("g_selected_uid").value = item.attr("id");
document.forms.selectedUnitForm.submit();
//self.close();
});
});
and then here is my jquery tree code -
<sjt:tree id="treeDynamicAjax"
jstreetheme="apple"
rootNode="#session.UNT_LIST"
childCollectionProperty="children"
nodeTitleProperty="title"
nodeIdProperty="id"
openAllOnLoad="true"
onClickTopics="treeClicked"
></sjt:tree>