I have the following form:
<button type="button" id="remover<? echo $valor->int_cod; ?>" idProspect="<? echo $valor->int_cod; ?>" value="<? echo $valor->int_cod; ?>" class="btn btn-primary btn-xs pequeno remover"><? echo $valor->int_nome." - ".$valor->int_whatsapp; ?></button>
<input type="hidden" class="hide" idprospect="<? echo $valor->int_cod; ?>" value="<? echo $valor->int_cod; ?>" name="prospects[]">
I would like to click on it, remove it. I did the following way:
$(".remover").click(function(){
var idProspect = $(this).attr("idProspect");
$("#remover"+idProspect).remove();
});
However, only removed the button, hidden does not remove. How do I remove hidden?