Jquery To Select Second Row Column Using First Row Column In Table
I want to select second row second column using first row second column tag in html table. Example: Row 1 ).text('Paid');
How about these?
$('table tr:eq(1) td:eq(1)').text("Paid")
or
$('#amount-paid').closest('tr').next().find('td:eq(1)').text('Paid');
Solution 2:
Try using innerHTML instead of text like this:
$('#amount-paid td:eq(1)').innerHTML = 'Paid';
Solution 3:
Using jQuery .eq()
$('table tr').eq(1).find('td').eq(1).text('Paid');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<table>
<tr>
<td>Row 1</td>
<td>$1.00 USD</td>
</tr>
<tr id="amount-paid">
<td>Row 2</td>
<td>$2.69 USD</td>
</tr>
</table>
I want to select second row second column using first row second column tag in html table. Example:
Row 1 | ).text('Paid');
How about these?
or
Solution 2:Try using innerHTML instead of text like this: $('#amount-paid td:eq(1)').innerHTML = 'Paid'; Solution 3:Using jQuery .eq()
|
Post a Comment for "Jquery To Select Second Row Column Using First Row Column In Table"