I am looking for a way to get value from cell with index 13. I was able to get parent element (which is row), but now I have problem how to get value from cell from that row.
My code - here's how I've got the row:
$(event.currentTarget).parent().parent()
This is what I've got from call above:
[tr.jtable-data-row]
Cell looks like this (button inside is making the call):
<td><button ng-click="ChangeMEST_STA($event)" class="ng-scope">V pripravi</button></td>
And the angular function (empty for now):
$scope.ChangeMEST_STA = function ($event) {
cMEST_STA = "";
cMEST_CDO2 = "";
/* change status */
}
And here is the whole row:
<tr class="jtable-data-row jtable-row-even" data-record-key="110002001"><td>110002001</td><td>Pločevinke</td><td>Mali kuharski mojster</td><td>15</td><td>KOS</td><td>1234567891234</td><td>MK27Q3 (V4FSPY)</td><td>VjRGU1BZIE1L</td><td><input type="checkbox" style="width: 15px; height: 15px;"></td><td><input type="text" title="Vnesi količino" style="width: 30px" value="1"></td><td><i id="tdAddToCart" class="glyphicon glyphicon-shopping-cart ng-scope" style="font-size: 20px; color: black; cursor: pointer;" ng-click="AddToDeliveryList()"></i></td><td style="display: none;"><input type="text" style="width:200px; display:none;" value="110000021"></td><td style="display: none;">1</td><td><button ng-click="ChangeMEST_STA($event)" class="ng-scope">V pripravi</button></td></tr>
How to use that call to get value from cell? I don't know how to combine HTML with angularjs. I would like to use something like: td:nth-child(12)
$(event.currentTarget).closest('tr.jtable-data-row:nth-of-type(12)')? or$(event.currentTarget).closest('tr').eq(12);