I would like to see if you can help me with the following problem that I have, I have 2 buttons which when pressed show different information, but I want that if none are pressed they are hidden and by pressing one or the other the information is displayed, and the another one is hidden, I leave the code that I am using, if you could help me I would appreciate it.
<button id="cambia" data-toggle="tooltip" data-placement="top" title="Aprobar" type="button" class="btn btn-success bSi"></button>
<button id="cambiaN" data-toggle="tooltip" data-placement="top" title="Negar" type="button" class="btn btn-danger bNo"></button>
<script>
$(document).ready(function(){
$("#cambia").click(function(){
$("#textoAprobado").toggle(1000);
});
});
</script>
<div id="textoAprobado" class="col-md-6 alert alert-success alert-dismissible fade show" role="alert">
<center>
<i class="fas fa-check-circle votos"></i><hr>¡Has votado a favor de este apoyo!
</center>
</div>
<script>
$(document).ready(function(){
$("#cambiaN").click(function(){
$("#textoAprobadoN").toggle(1000);
});
});
</script>
<div id="textoAprobadoN" class="col-md-6 alert alert-danger alert-dismissible fade show" role="alert">
<center>
<i class="fas fa-check-circle votos"></i><hr>¡Has votado en contra de este apoyo!
</center>
</div>
</center>