I found many scripts to limit max number of checkboxes that can be selected in a page with javascript, for example here is one:
http://www.plus2net.com/javascript_tutorial/checkbox-limit.php
However I don’t need a specific number, but a VARIABLE one.
This means that I need to have a percentage limit instead of just a number.
For example, limit user selection to max 30% of the checkboxes in the page.
Any help on how to achieve this is highly appreciated!
To alter that script to be a percentage vs. a fixed total you just need to take 30% of the total number of elements.