Mess4me, можно намного проще написать:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<title></title>
<style>
.product {
color: red;
}
</style>
</head>
<body>
<table>
<tr>
<td>
<span id="down">-</span>
<input type="text" value="0" label="name" id="counter">
<span id="up">+</span>
</td>
</tr>
</table>
<script>
$('tr').on('click', '#down, #up', function() {
var input = this.parentNode.getElementsByTagName('input')[0];
input.value = +input.value + (this.id == 'down' ? -1 : 1);
$(this).closest('tr').toggleClass('product', input.value > 0);
})
</script>
</body>
</html>