I need to check the status of my radio button
so that if it is active on "Yes" , it opens <div class="camposExtras">
, if you click "No" It closes div
, and this should be accessible at all times.
My radio button
below:
<input type="radio" class="FlgPontua" name="FlgPontua" value="Sim" checked>
<input type="radio" class="FlgPontua" name="FlgPontua" value="Nao">
And my div
is:
<div class="camposExtras">
Aqui vem os dados que é para esconder ou aparecer
</div>
I'm trying to do this:
$(".FlgPontua").change(function() {
console.log('entro aqui')
if ($(this).val() == "Sim") {
$('.camposExtras').show();
}else{
$('.camposExtras).hide();
}
});
But it's not coming back to me.