<form id="form1" name="form1" method="post" action="">
<input type="checkbox" id="check1" value="radio" />
<label>left</label>
<input type="checkbox" id="check2" value="radio2" />
<label>right</label>
</form>
I would like to know if the checkbox is checked or not everytime someone clicks on it and then set a variable to the value yes.
if ($('#check1').attr('checked'); ){
var check1 = 'yes';
else
var check1 ='no'
}
this is what I have so far and it doesn't work How do I return the value