Hi all,
Is it possible to disable checkboxes when the maximum is reached?
What I would like to do is that a visitor can select a maximum of 5 checkboxes. Then the rest should be disabled.
The code I use :
<script>
function countChecked() {
var n = $("input:checked").length;
$("div").text(n + " selected");
}
countChecked();
$(":checkbox").click(countChecked);
</script>