I have a table that is meant to be a specific size, the value in the 5th cell of the table is always truncated and I want to add a title
attribute that is the full value of the 5th cell.
I have been looking at some solutions such as:
jQuery and Table, grab every cell in the NTH column
But those aren't exactly what I want. I've tried this:
$('#tableID > tbody > tr:nth-child(n) > td:nth-child(5)').attr('title', 'hello');
And this does give every 5th cell and add the title
attribute to it. But the problem is that I want to be able to get an array or list of the 5th cells and be able to make the .text()
of the cell into the title
attribute. I tried to put $('#tableID > tbody > tr:nth-child(n) > td:nth-child(5)')
into a variable, but that doesn't give me the array.
Is there a way of getting the full list of 5th column of every row in my table?