最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Tree of checkboxes - Stack Overflow

programmeradmin3浏览0评论

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 badges
Add a ment  | 

4 Answers 4

Reset to default 3

You 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.

发布评论

评论列表(0)

  1. 暂无评论