I want to activate a radio
at the time that my input checkbox
is true, with the code I have it works well but only once, when I hit it again no.
$(document).ready(function($) {
$("input[type='checkbox']").click(function(event){
var inputcheck = $(this);
var checked = $("input[type='radio']");
if (inputcheck.prop("checked") == true ){
$(checked).attr('checked', true);
} else{
$(checked).attr('checked', false);
} }); })
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>