I want to make two RadioButtons work with the same ID but I want to make that when you press deposito
show the div1
and when you press ventanilla
show the div2
. I can not get it, I hope you can help me do it with javascript or jquery. Thanks
$(document).ready(function() {
$("#pago1").click(function(evento) {
if ("#pago1" == Deposito) {
$("#div1").css("display", "block");
$("#div2").css("display", "none");
} else {
$("#div1").css("display", "none");
$("#div2").css("display", "block");
}
});
});
<p class="auto-style3">
<input name="pago1" type="radio" style="width: 70px; height: 70px" value="Ventanilla" /> <span class="auto-style4"> Recoger en Ventanilla</span>
</p>
<p> </p>
<p class="auto-style3">
<input checked="checked" name="pago1" type="radio" style="width: 70px; height: 70px" value="Deposito" /><span class="auto-style4"> Deposito Bancario</span>
</p>
<p> </p>
<div id="div1" style="display:;">
<p class="auto-style3"><span class="auto-style4">CLABE Bancaria:</span>
</p>
<p class="auto-style1">
<input type="number" name="RECEIVER_BANK_ACCOUNT_NUMBER" id="RECEIVER_BANK_ACCOUNT_NUMBER" size="23" style="font-family: Arial; font-size: 50pt; height: 75px; width: 845px;" required class="auto-style5" />
</p>
<p class="auto-style3"><span class="auto-style4">Confirma CLABE Bancaria:</span>
</p>
<p class="auto-style1">
<input type="number" name="RECEIVER_ACCOUNT_NUMBER_CONFIRMATION" id="RECEIVER_ACCOUNT_NUMBER_CONFIRMATION" size="23" style="font-family: Arial; font-size: 50pt; height: 75px; width: 845px;" required class="auto-style5" />
</p>
</div>
<div id="div2" style="display:none;">
<center>
<span>Has seleccionado ventanilla</span>
</center>
</div>