lundi 28 novembre 2016

Limit checkboxes but only those newly checked

I have a bit of jquery that lets me limit the number of checkboxes a user can check on a page:

 if ($('input[type=checkbox]:checked')

But, the user is limited to 'x' number once per day. So they come to the form, submit their limit (3 checked). They come back next day, I have the 3 checked that were from yesterday but set to disabled:

 checked="checked" disabled="disabled" disabled/>

Is there a way to modify my if statement to say "input[type=checkbox]:checked" but not if disabled or not if class="disabled" so these don't count against the daily limit?




Aucun commentaire:

Enregistrer un commentaire