My question is maybe a bit unclear so i will give an example
<table id="products">
<tr id="P1" class="A1"><td>1x</td><td>Product 1</td><td>€ 9,50</td><td><a href="#">(x)</a></td></tr>
<tr id="P2" class="A1"><td>1x</td><td>Product 2</td><td>€ 10,50</td><td><a href="#">(x)</a></td></tr>
</table>
What i want to accomplish is the following function to work
$('#bestelling tr').each(function(index) {
var naam = $(this + " td + td").text();
var id = $(this).attr('id');
alert(id + " " + naam);
});
Does anyone knows how i can accomplish this? Sorry for my brief explanation of the problem my english isn’t that good.
1 Answer