2

Fancy tree

What we want is to disable the checkboxes based on custom classes that we add.

For e.g.:

renderNode: function(event, data) {

    if(!data.node.folder) {
        $(data.node.span).addClass("custom-class");
    }

    $(".custom-class").css({ // css to disable checkbox});

}
kittykittybangbang
  • 2,380
  • 4
  • 16
  • 27
Nikhil Das Nomula
  • 1,863
  • 5
  • 31
  • 50

1 Answers1

5

You cannot disable checkboxes using css only (just switch or dim the image). Rather use the api:

node.unselectable = true;
node.render();
mar10
  • 14,320
  • 5
  • 39
  • 64
  • Ohh ok, the tree we have is a large one so we wanted to go the css way as opposed to this way as we need to parse through all the nodes in the tree. Thank you for the reply tho, much appreciated. Respect to you for creating such a wonderful plugin! – Nikhil Das Nomula Aug 07 '15 at 19:20