は、私はこのような行を持つテーブルがある:表に数字を追加
<tr>
<th width="30"></th>
<th width="30">Time</th>
<th>Description</th>
</tr>
<tr>
<td><a href="#" class="edit">edit</a></td>
<td class="time">2.50</td>
<td>I did this, and also that, then a little of something else.</td>
</tr>
<tr>
<td><a href="#" class="edit">edit</a></td>
<td class="time">1.50</td>
<td>Another description of time.</td>
</tr>
<tr>
<td><a href="#" class="edit">edit</a></td>
<td class="time">1.50</td>
<td>Yet one more item entered.</td>
</tr>
<tr class="total">
<td><strong>Total:</strong></td>
<td><strong>[calculate total here]</strong></td>
<td> </td>
</tr>
私はjQueryとを使用していた時間を追加するとき、私はすべての数字を追加する必要が発生した機能の一部として、 td.timeセル。しかし、私の人生のために、私はループを書くことがあまりよくありませんし、それを理解することはできません。
すべてのtd.timeセルを調べ、数字を追加するコードが必要です。私が合計を得たら、[ここで合計を計算]にそれを挿入することができます。
ありがとうございます!
パーフェクト。ありがとう! – Ben