I have the following radio button that I filled with php, I need to bring the text "automatic" or "manual" if it is checked I have tried this without result:
$('input[name=tipo-caja]:checked').text();
<section>
<label>
Tipo Caja
</label>
<div >
<label class="radio">
<input id="tipo-caja-manual" name="tipo-caja" type="radio" value="1" <?php if (isset($auto))if ($auto->caja=="1"){ ?>
checked=""
<?php } ?>>
<i>
</i>
Manual
</input>
</label>
<label class="radio">
<input id="tipo-caja-auto" name="tipo-caja" type="radio" value="0" <?php if (isset($auto))if ($auto->caja=="0"){ ?>
checked=""
<?php } ?>>
<i>
</i>
Automatica
</input>
</label>
</div>
</section>