Hi. I am new to using JQuery and would much appreciate your help.
I have a form on which I've created 5 checkbox groups. Each of these groups consist of multiple checkboxes.
The first group - it's id equals "MASTER" - contains 4 checkboxes. These checkboxes are labelled (that is, their actual label tags are) "A", "B", "C", "D".
My vision is to have a user check, say, "A" in MASTER and this causes the "A" checkbox group to appear below the MASTER group. If a user then checks "B" in MASTER, then the "B" group appears below the "A" group. If the user then unchecks "A", then the "A" group disappears. And similarly for each of the four "subordinate" groups.
My plan of attack was to iterate over the MASTER checkbox group, and for each checked box, somehow populate an array of their associated label tags. I would do the same for all of the checkboxes in MASTER that are not checked, placing their label tags in another array. I would then show and hide the subordinate checkbox groups based on these label tags. The subordinate groups have label tags equal to these captured label tags in these two arrays. All of this action would be triggered via a "click" action on the tag in which the MASTER group resides.
I've tried all manner of techniques, including "$.each" and ".map" to populate arrays. I just can't get my mind around the needed syntax. Please help.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.