Check-box lists dynamic response
Hi,
I have a list element with a lot of sub categories. That will be used for category management.
HTML example
- <ul>
- <li><input type="checkbox" /> Category name 1
- <ul>
- <li><input type="checkbox" /> Subategory name 2</li>
- </ul>
- </li>
- <li><input type="checkbox" /> Category name 2
- <ul>
- <li><input type="checkbox" /> Subategory name 3</li>
- <li><input type="checkbox" /> Subategory name 4
- <ul>
- <li><input type="checkbox" /> Subsubategory name 1</li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
I am just looking for a plug-in or script which would suit my needs the most and they are:
- To claps all the tree up to main categories
- One time if a parents check-box is checked, that all child`s check-box would be checked.
- Another time then parent is checked the child`s check-boxes would stay as it is but if child is checked all the direct parents of it would be checked to.
Is there some kind plug-in which would do that?