Hi friends, 
I'm having a menu like this -

that I've fetched from the database, using recursive function, where data is stored as - id | title | parent
I need a javascript function, that will help me to check / uncheck child elements (if present) when I click on a parent at different level.
Like,
Wondering, if anyone is having any idea here on how to do this.
Thanks.
					I'm having a menu like this -

that I've fetched from the database, using recursive function, where data is stored as - id | title | parent
I need a javascript function, that will help me to check / uncheck child elements (if present) when I click on a parent at different level.
Like,
- if I check / uncheck Test March, all the check boxes should be checked / unchecked.
 
- If I check / uncheck A scent during sleep, only this title should be checked / unchecked.
 
- If I check / uncheck Sub March 1, this title and all titles following this should be checked / unchecked.
 
- If I check / uncheck test sub sub march, the last two should be checked / unchecked.
 
Wondering, if anyone is having any idea here on how to do this.
Thanks.
Comment