mercredi 21 janvier 2015

using jquery, how can i reference all checkboxes with a certain value and that are unchecked?

I tried to reference all unchecked checkboxes with a certain class by using this code;



var myVal = 200;
$('input[type=checkbox][value=' + myVal + ']:not(:checked)').attr('disabled', 'disabled');


but it doesn't seem to work. What is wrong with the syntax above to select all unchecked checkboxes that have a certain value?





Aucun commentaire:

Enregistrer un commentaire