Сообщение от byxah
|
$('#list td.total p.value')
<p value>
|
Может быть
<p class="value">
?
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>table</title>
</head>
<body>
<table id="list">
<tr>
<td>
<p class="value">1</p>
</td>
<td>
<p class="value">1</p>
</td>
<td class="total">
<p class="value">1</p>
<p class="value">2</p>
</td>
</tr>
<tr>
<td>
<p class="value">1</p>
</td>
<td>
<p class="value">1</p>
</td>
<td class="total">
<p class="value">1</p>
<p class="value">2</p>
<p class="value">3</p>
</td>
</tr>
<tr>
<td>
<p class="value">1</p>
</td>
<td>
<p class="value">1</p>
</td>
<td class="total">
<p class="value">1</p>
</td>
</tr>
</table>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script>
$("#list td.total").each(function () {
$("p.value", this).each(function (index) {
console.log(index);
});
});
</script>
</body>
</html>