JSFiddle - React, Tailwind, and code Playground
HTML
<table class="tableWinkelwagen">
<tr>
<th>Product(en)</th>
<th>Prijs</th>
<th>Aantal</th>
<th>Totaal</th>
<th></th>
</tr>
<tr class="tableWinkelwagen-productItem" data-id="1">
<td>Treinreis Utrecht - Boedapest <br> <small>05/08/2014 - 05/08/2014</small></td>
<td>€<span class="priceUnit">170</span>,-</td>
<td><div class="boxNumbers"><i class="glyphicon glyphicon-minus-sign boxNumbers-min">-</i> <input type="text" class="boxNumbers-input priceAmount" placeholder=""> <i class="glyphicon glyphicon-plus-sign boxNumbers-plus">+</i></div></td>
<td>€<span class="priceTotal">340</span>,-</td>
<td><a href="" class="glyphicon glyphicon-trash"></a></td>
</tr>
<tr class="tableWinkelwagen-productItem" data-id="1">
<td>Treinreis Utrecht - Boedapest <br> <small>05/08/2014 - 05/08/2014</small></td>
<td>€<span class="priceUnit">170</span>,-</td>
<td><div class="boxNumbers"><i class="glyphicon glyphicon-minus-sign boxNumbers-min">-</i> <input type="text" class="boxNumbers-input priceAmount" placeholder=""> <i class="glyphicon glyphicon-plus-sign boxNumbers-plus">+</i></div></td>
<td>€<span class="priceTotal">340</span>,-</td>
<td><a href="" class="glyphicon glyphicon-trash"></a></td>
</tr>
<tr>
<td><strong>Totaal</strong></td>
<td></td>
<td></td>
<td>€<span>340</span>,-</td>
...
CSS
.glyphicon{color:red; display:inline-block; padding:10px 10px; cursor:pointer; font-size:20px; font-weight:bold; }
JavaScript
var FTwinkel = (function(){
var productItemAll = document.querySelectorAll(".tableWinkelwagen-productItem")
var productItemPreviewAll = document.querySelectorAll(".tableWinkelwagen-productItemPreview")
addEventListenerToMinPlus()
function addEventListenerToMinPlus(){
var x, y
for(var i = 0; i < productItemAll.length; i++){
x = productItemAll[i].querySelector(".boxNumbers-min")
x.addEventListener("click", function(i){return function(i){updateProduct(i)}}(i))
console.log(x)
}
}
function updateProduct(jow){
alert(jow)
}
return {
increaseAmount: updateProduct
}
})()