Assign Click Events to < li > in JQuery Treeview
jquery, jquery-plugins, treeview
Solution
Using the markup from the example at http://docs.jquery.com/Plugins/Treeview:
$("span.file, span.folder", "#example li")
.click(function() { alert($(this).text()); });
works. Handling the click on the LI items themselves captures branch contractions and expansion.
Problem
I am using the JQuery Treeview plugin to display some data. Basically, I would like to add a click event to the child < li > elements that copies their innerhtml into another div on the page. I have not been able to assign a click event to these < li > elements however. Hoping someone has tread this ground before and can provide some help. Thanks.