I have a for-loop that creates a list. Each item on the list has a hidden input and function as below.
<input type="hidden" id="network-id" name="network_id" value="1">
<button type="button" onclick="transfer(someId);"></button>
I'm using my JS code to read the hidden input in transfer
function.
networkId = $("#network-id").val();
But since each element ID is the same, it only reads the first "network-id"
element on the list.
What is the best way to read each element?