I'm looking for a "tree of checkboxes" widget for Javascript. I tried to use jquery-checktree which purports to do exactly what I want, however it has the following problems:
- It doesn't recognize checkboxes that are already checked and renders everything as unchecked.
- It starts off with everything collapsed and doesn't give an option to start with everything uncollapsed
- Each line of my tree starts indented from the line above, even if they are
<li>
in the same<ul>
.
Can anybody remend one that works, or fixes for this one?
I'm looking for a "tree of checkboxes" widget for Javascript. I tried to use jquery-checktree which purports to do exactly what I want, however it has the following problems:
- It doesn't recognize checkboxes that are already checked and renders everything as unchecked.
- It starts off with everything collapsed and doesn't give an option to start with everything uncollapsed
- Each line of my tree starts indented from the line above, even if they are
<li>
in the same<ul>
.
Can anybody remend one that works, or fixes for this one?
Share Improve this question asked Feb 23, 2010 at 19:51 Paul TomblinPaul Tomblin 183k59 gold badges323 silver badges411 bronze badges4 Answers
Reset to default 3You could try the YUI TreeView. They have an example with checkboxes. It might not be ideal for all uses, but it's pretty good.
ExtJS 3.x has one. I have not used it, but it looks nice. Not sure if you're willing to add ExtJS to your stack...
Another option is jstree which is based on jquery also.
I ended up making a few fixes to jquery-checktree and using it. Some of the changes are probably broadly applicable and I emailed them to the developer, and others are probably only useful to my project.