mardi 6 juillet 2021

jQuery .prop is not working for me I'm trying to select a checkbox on document load but it is not working

$(document).ready(function(){
  $('.check').each(function() {
    ${this}.prop('checked',true).checkboxradio("refresh");
    console.log($(this).attr("value"));
  });
});

I used the above code with HTML as below

<input type="checkbox" class = "check" value="one">



Aucun commentaire:

Enregistrer un commentaire