I am showing a form to the user with few checkboxes. Some of them will be pre-selected and some won't be.
like below:
<input type="checkbox" name="box" value="9"> nine
<input type="checkbox" name="box" value="10"> ten
<input type="checkbox" name="box" value="11"> eleven
<input type="checkbox" name="box" value="12" checked> twelve
Please note that in the last checkbox the checked keyword is added using a scriplet.
Now, even when I physically deselect check twelve, my javascript code doesn't understand that the checkbox is no longer selected.
Update I pasted the wrong link earlier. Here is the updated jsfiddle link: http://jsfiddle.net/JLSUK/20/
What I'm trying to accomplish alert the user ONLY when they have selected checkbox twelve. However, even if that checkbox is not selected, I'm getting an alert that it IS selected. I think this is because I have checked in the actual HTML content, however, I can't remove that since the first time the page loads, I have to show to the user that they had this particular checkbox selected.
Is this doable with jQuery?