Oi boa noite estou com dúvidas no jquery. Tenho uma tabela com valores e não consigo ao clicar no botão aparecer um valor por vez, ao clicar só aparece o último valor da tabela. Código feito e esse aqui
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<title>Cadastro Usuário</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body class="posicaoForm">
<fieldset class="border p-2 borderCampos">
<legend class="w-auto">Produtos</legend>
<form method="post" action="" id="ajax_form">
<table class="table">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Associado</th>
<th scope="col">Não associado</th>
<th scope="col">Estudante</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Produto A</th>
<td>R$100</td>
<td>R$200</td>
<td>R$50</td>
</tr>
<tr>
<th scope="row">Produto B</th>
<td>R$300</td>
<td>R$400</td>
<td>R$150</td>
</tr>
<tr>
<th scope="row">Produto C</th>
<td>R$500</td>
<td>R$600</td>
<td>R$250</td>
</tr>
</tbody>
</table>
<button class='produto btn btn-primary'>Produtos Associado</button>
<button class='produto1 btn btn-primary'>Produtos Não Associado</button>
<button class='produto2 btn btn-primary'>Produtos Estudante</button>
</form>
</fieldset>
<br />
<div id="resultado"></div>
<script>
$('.produto').on('click', function(){
var lista = $('td:nth-child(2)');
$.each(lista, function(index,item){
valor = $(item).text();
trocar = valor.replace(",",".");
//alert(trocar);
$("#resultado").html(lista);
});
});
$('.produto1').on('click', function(){
var lista = $('tr > td:nth-child(3)');
$.each(lista, function(index,item){
valor = $(item).text();
trocar = valor.replace(",",".");
alert(trocar);
});
});
$('.produto2').on('click', function(){
var lista = $('tr > td:nth-child(4)');
$.each(lista, function(index,item){
valor = $(item).text();
trocar = valor.replace(",",".");
alert(trocar);
});
});
</script>
</body>
Aguardo resposta