Find the table / table body, and get the rows: $('tbody').children('tr')
For a specific row (ex 12th), find the cells (td
s): .eq(11).children('td')
For all the cells, skip those that have an attribute: not('td[rowspan=8]')
Skip over some fixed columns (ex start at column 2): slice(1, 31)
For example on http://www.tshwane.gov.za/sites/Departments/Public-works-and-infrastructure/Pages/Load-Shedding.aspx, to get
- the schedule
- the 10th
tbody
- the 10th
- for stage 4 (4th in each group) at "3:00 to 5:30" (2nd group)
- groups of 8, so
8 * (2 - 1) + 4
th - 3 "header" rows
- groups of 8, so
- on day 6 (6th column):
- skipping the rowspan columns (rowspan attr) and the "stage x" columns (slice)
$('tbody').eq(10 - 1)
.children('tr').eq(3 + (8 * (2 - 1)) + (4 - 1))
.children('td').not('td[rowspan=8]').slice(1, 31)
.eq(6 - 1).text().trim()