lilbiscuit lilbiscuit - 1 month ago 7
jQuery Question

How to select td when you know th text with jquery

I have a table containing rows with exactly one th and one td like this:

<th>Phone Number</th>

I need to select the td cell (and replace the html) by using the th text "Phone Number". I can get the th cell with

$('th:contains("Phone Number")')

but I can't figure out how to select the corresponding td cell.

$('th:contains("Phone Number")').next('td');