如何在php(jquery插件)中将onclick事件添加到treeview?

I have realized a asynchronous treeview in php, now i want to add onclick event to the items in the treeview, and then make query in mysql.

Do you know how to do that?

Thanks a lot.

Edit:

Async.html:

<script type="text/javascript">
$(document).ready(function(){
    $("#black").treeview({
        url: "twodimen.php"
    });
    $("#black > li").live("click",function()){
        $.get("");
    })
});
</script>

<ul id="black">
</ul>

But when i add the $("#black > li").live("click", function()){}, the treeview doesn't display.

How to do that?

Well, this would be a start:

$("#treeview > li").click(function() { // this sets the onclick on your node
    $.get('url_to_php_script_that_will_the_db'); // this calls an url using GET.
    $.post('url_to_php_script_that_will_the_db'); // this calls an url using POST.
}

Suppose your treeview has id 'treeview', all the <li> under the treeview will have a click event. It's a rough start, but that's basically what you're looking for.