I'm not very familiar with jQuery selectors, so would like some help.
I have a table like this:
<table class="test">
<tr>
<td>Section Heading 1</td><td>Section Text 1</td>
</tr>
<tr>
<td>Section Heading 2</td><td>Section Text 2</td>
</tr>
<tr>
<td>Section Heading 3</td><td>Section Text 3</td>
</tr>
<tr>
<td>Section Heading 4</td><td>Section Text 4</td>
</tr>
<tr>
<td>Section Heading 5</td><td>Section Text 5</td>
</tr>
</table>
What I need to do is find the td
containing a specific text, and the operate on the text in the td
on its right.
For example, say I want to find the td
containing the text Section Heading 4
, and the concatenate the text contained in the td
to it's right, with the text hello
, so that Section Text 4
becomes Section Text 4 hello
..
Which jQuery selector(s) can be used for this purpose ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…