I want to do something like this: Limit Checkbox amount
But with a little change. I want checkboxes to also have to be consecutive.
Little example:
If I have 10 checkboxes, and my limit is 3, then the user can check only first, second and third; or third, fourth, fifth. Not first, third, fourth.
Edit: Revised code for consecutive check boxes.
DEMO: http://jsfiddle.net/sa2Lg/2/
For HTML like below,
You can limit using below script,
DEMO: http://jsfiddle.net/sa2Lg/