Here is the code that I have compiled how ever it doesnt work.I am trying to limit selectable checkboxes with 2.
and here is the javascript code
var limit = 2;
$('input.civicrm-enabled.form-checkbox').on('change', function(evt) {
if($(this).siblings(':checked').length >= limit) {
this.checked = false;
}
});
Here is the html
Aucun commentaire:
Enregistrer un commentaire