1
Colleagues
I have a php code that brings the value of the product from the bank.
<?php
...
while($jmMostrar = mysqli_fetch_object($sqlMostrar)){
$mostrar = "<input type='hidden' id='produtos' name='valorProduto' value='".$jmMostrar->ValorProduto."'>";
}
Each $jmMostrar->Valuemove brings a different value. How would I get these values with jquery? I tried that way, but it only brings me the first value:
$('.value-plus').on('click', function(){
var qtdCarrinho = $("#qtdCarrinho").val();
Fox inside the while you don’t want to make a concatenation (
$mostrar .= "...
) or is that what you really want?– Miguel
Hello Miguel. Actually it is already concatenated. I put here as an example. I need to take the product value and play inside a jquery outside the PHP loop.
– user24136
Ha ok I realized, in this case I think you already have the answer of @Alison who does it. BUT a lot of attention should not have repeated ids in the DOM... My suggestion is to switch to class
– Miguel