如何在struts2 jquery树上添加css效果

如何在struts2 jquery树上添加css效果,struts2,struts2-jquery-plugin,Struts2,Struts2 Jquery Plugin,我的jquery树视图有问题。现在我用这个: 我想在点击节点后,在选定的树节点上创建css背景。我该怎么做,请给我一些想法?在树节点上进行切换时显示css效果 但是,单击后,css效果不会显示 我在head标签中添加了这个 ,在脚本中添加了以下代码 $(function(){ $.subscribe('treeClicked', function (event, data){ alert("treeClicked");// check if script

我的jquery树视图有问题。现在我用这个:

我想在点击节点后,在选定的树节点上创建css背景。我该怎么做,请给我一些想法?在树节点上进行切换时显示css效果 但是,单击后,css效果不会显示

我在head标签中添加了这个

,在脚本中添加了以下代码

$(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();
        });
    });
这是我的jquery树代码-

<sjt:tree id="treeDynamicAjax"
jstreetheme="apple"
rootNode="#session.UNT_LIST"
childCollectionProperty="children"
nodeTitleProperty="title"
nodeIdProperty="id"
openAllOnLoad="true"
onClickTopics="treeClicked"
></sjt:tree>


我想你的英语缺了一个动词。你想制作“css背景”什么?@madth3,谢谢你在我的帖子上的编辑。我是java的新手,英语也很差。我的问题现在好了。再次感谢!