I have checkbox Menu and I want: If all submenu checked parent checkbox checked and If more than zero and less than all child checkbox checked parent checkbox Indeterminate become true.This is Exactly my menu
<div id="checboxlist">
<ul>
<li><input type='checkbox'><a class='Root' href='#'> <span>AA</span></a>
<ul>
<li class='Root'><input type='checkbox'><a href='#'> <span>A</span></a>
<ul>
<li><input id='1' type ="checkbox">X1</li>
<li><input id='2' type ="checkbox">X2</li>
<li><input id='3' type ="checkbox">X2</li>
</ul>
<li class='Root' ><input type='checkbox'><a href='#'> <span>B</span></a>
<ul>
<li><input id='1' type ="checkbox">X1</li>
<li><input id='2' type ="checkbox">X2</li>
<li><input id='3' type ="checkbox">X2</li>
</ul>
</li>
<li><input type='checkbox'><a class='Root' href='#'> <span>BB</span></a>
<ul>
<li class='Root'><input type='checkbox'><a href='#'> <span>A1</span></a>
<ul>
<li><input id='1' type ="checkbox">X1</li>
<li><input id='2' type ="checkbox">X2</li>
<li><input id='3' type ="checkbox">X2</li>
</ul>
</li> </ul>
</ul>
</div>
Aucun commentaire:
Enregistrer un commentaire