jeudi 26 mars 2015

Unchecked parent if child node is unchecked

I having problem on unchecked parent node if one of the child is unchecked. But i had try to search solution but none of the solution work on my code.


I refer the nested checkbox function here http://ift.tt/1E3ZuXO


Here is example of my code:



<ul>
<li>
<label><input type="checkbox" data-id="All Master" data-name="All Master" id="myCheckBox0" onchange="checkDisabled(testing);"/> All Kedai Kiosk On Master Mode</label>
<ul>

<li>
<label><input type="checkbox" data-id="Terengganu" data-name="Terengganu" id="myCheckBox76" onchange="checkDisabled(testing);"/> Terengganu</label>
<ul id="navlist">
<li><label><input type="checkbox" data-id="Kiosk 63" data-name="Kiosk 63" id="myCheckBox77" onchange="checkDisabled(testing);"/> Kiosk 63</label></li>
<li><label><input type="checkbox" data-id="Kiosk 64" data-name="Kiosk 64" id="myCheckBox78" onchange="checkDisabled(testing);"/> Kiosk 64</label></li>
</ul>
</li>
</ul>
</li>
</ul>


What i want is tht when i unchecked kiosk 63 then the Terengganu which is parent also will be unchecked. I'm using the jquery.deepcheckbox.js that i download from the website too. What should i change in order to achieve that ? Thanks





Aucun commentaire:

Enregistrer un commentaire