Answers for "checkbox in jquery"

9

jquery check checkbox

$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);
Posted by: Guest on May-19-2020
0

checkbox click event jquery

$('input[type="checkbox"]').click(function(){
  if($(this).is(":checked")){
    //input element where you put value
    $("#isClicked").val("Yes");
    // console.log($("#isClicked").val());              
  }
  else if($(this).is(":not(:checked)")){
    $("#isClicked").val("");
    //  console.log( $("#isClicked").val());
  }
});
Posted by: Guest on May-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language