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!
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!
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.