Having a code like this:
<input type="radio" id="campo_1">
<input type="text" class="hidden" name="campo_1">
<input type="radio" id="campo_2">
<input type="text" class="hidden" name="campo_2">
I want, for example, having :checked
radius #campo_1
remove the hidden class from the input with name campo_1
and change the name to micampo
What would be the best way?
$('#campo_1').click(function(){
if ($('#campo_1').is(':checked'){
//aquí es donde no tengo ni idea de como hacerlo...
}
});
Or is there a better way?