You have to unbind the click event on the span. Here's what I did:

$("#categories").treeview().find('span.[your span class]').unbind
('click').click();  //replace [your span class] with the class of your
nodes.  By default they are 'folder'

the +/- will still collapse and expand, but the label (<span>) will
perform the action you specify.


In addition to that, you can add your own function that will be
executed when the user clicks on that node:

$("#categories").treeview().find('span.[your span class]').unbind
('click').click(function(){
        //add the action you want to happen when the user clicks on the node
});

Reply via email to