how can I verify a radio checked value
Hello, I have a plateform that requiert to ask the patient if he is subscribed in my database, so one of the forms is showed (to login or subscribe)
Can you help me to correct the jequery function :
<script>
$(document).ready(function() {
$("use2").on("click", function () {
if ($('input[id=use2]').is(':checked')) {
$("#login").show();
} else {
$("#login").hide();
}
})
$("use1").on("click", function () {
if ($('input[id=use1]').is(':checked')) {
$("#insc").show();
} else {
$("#insc").hide();
}
})
});
</script>
and here is my html code :
<div style="color:#00BFFF;width:80%;float:left;line-height:40px;font-size: large;">Avez vous déjà utilisé Docteur? </div>
<div class="option-group field" name="use" id="use">
<label class="option block">
<input type="radio" name="use" value="0" id="use1">
<span class="radio" style="display: inline-block">C'est la première fois que j'utilise Docteur </span></label><br>
<label class="option block">
<input type="radio" name="use" value="1" id="use2">
<span class="radio" style="display: inline-block">J'ai déjà un docteur</span></label>
</div>