For a project I’m working on making a checklist. The idea is that visitors can select only one checkbox, the reason I’m not using radio buttons is beacause I need the checkboxes (checklist).
The problem I am having that I can’t figure out the selector. I got 1 main question and 3 subquestions. All the questions are in spans so I can make them unique but I can’t recall how to propper select it.
$('span .sub_antwoord').click(function() {
$('span .sub_antwoord').each(function() {
$(this)[0].checked = false;
});
$(this)[0].checked = true;
});
Here is the jsFiddle for the project http://jsfiddle.net/Ur4X9/ If you click through the checkboxes you can see the problem. I need to select one of each question, ja or nee.
Is this what you have in mind?
http://jsfiddle.net/Ur4X9/4/