Answers for "jquery check if one of the checkbox is checked"

3

how do i check if JQuery checkbox is checked

$('#isAgeSelected').click(function() {
    $("#txtAge").toggle(this.checked);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">
  </script>
<input type="checkbox" id="isAgeSelected"/>
<div id="txtAge" style="display:none">Age is something</div>
Posted by: Guest on June-22-2020
0

if checkbox checked jquery value 1

var checked = '0';  if($('#checkbox').prop('checked')){ checked = '1'; }
Posted by: Guest on June-16-2020

Code answers related to "jquery check if one of the checkbox is checked"

Code answers related to "Javascript"

Browse Popular Code Answers by Language