Try using .last() selector:
Reduce the set of matched elements to the final one in the set.
$( "table#dataTable.xLookup thead#PickerTHEAD tr th:visible" ).last()
Because your last visible child is not last child in the DOM node.
var a = $( "table#dataTable.xLookup thead#PickerTHEAD tr th:visible" ).last();
console.log(a.html());
|
Option ID |
My Description |
QTY |
Unit Price |
nj1 |
nj2 |
...
...