Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery: How to select the values from the table's column based on tables header only

I have a table with header ID. I need to select all the fields under this header. I don't have access to the source code and no classes are used in this table. Any idea on how to get this done?

like image 367
Vlad Avatar asked Jan 23 '23 23:01

Vlad


1 Answers

To get the first column:

$(function() {
   var col = $("td:nth-child(1)");
});
like image 183
Chris Fulstow Avatar answered Feb 15 '23 10:02

Chris Fulstow