Need to select closest item on table
I need to hide the "lblItemPrice" div when I click the "btnEdit" button.I
need to get the closest div which having "lblItemPrice" class.
I have tried like this,But not working.
$('.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>
No comments:
Post a Comment