So, I've been using dynatree (http://wwwendt.de/tech/dynatree/doc/samples.html) with checkboxes for the listing of my data. Apparently, I wanted to remove the functionality that will let the checkboxes be clicked if <li>
tag has been clicked. Been researching for this but did not yield to any solution.
Asked
Active
Viewed 216 times
0

jellyfication
- 170
- 2
- 12
-
2Did you try css `pointer-events: none` ? – Tony Dec 13 '13 at 02:15
-
Just note that `pointer-events: none` doesn't have the greatest cross-browser support. – Sampson Dec 13 '13 at 02:33
-
@jellyfication Jonathan is right, check browser support here: http://caniuse.com/#search=CSS%20pointer-event – Tony Dec 13 '13 at 02:37
-
@Tony, Yeah, Sadly, I needed to implement it on IE – jellyfication Dec 13 '13 at 02:52
-
@jellyfication Ok, what about `$("#checkbox").attr("disabled", "disabled");` ? – Tony Dec 13 '13 at 02:56
1 Answers
2
This little snippet should do what you want:
$("#my-div").dynatree({
checkbox: true,
onActivate: function (node) {
node.data.unselectable = true;
},
});

Gruff Bunny
- 27,738
- 10
- 72
- 59