I would like to create an alert once too many check boxes have been checked.
Please see the setup here:
At the moment – the alert keep returning 0 – rather than counting the checkboxes…
Any suggestions would be great thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://jsfiddle.net/wDbej/6/ – move your variable inside the click function. The way you had it initialized the variable, but didn’t update the value on clicking the box.