"lblItemPrice"
ボタンをクリックするとdivを非表示にする必要があります。クラスを持つdivを"btnEdit"
取得する必要があります。closest
"lblItemPrice"
私はこのように試しましたが、うまくいきません。
$('.btnEdit').die('click').live('click', function () {
$(this).closest('.lblItemPrice').hide();
});
HTML
<table class="invoice" id="invoiceList">
<tbody>
<tr class="">
<td class="value" id="pricetd">
<div id="itemPriceDiv">
<div class="lblItemPrice">
$2.00
</div>
<input type="text" id="editPrice" name="editPrice" placeholder="edit price">
</div>
</td>
<td class="value">
$2.00
</td>
<td>
<button class="btnEdit actionButton secondaryButton short" type="button">
Edit</button>
</td>
<td>
</td>
</tr>
</tbody>
</table>