I have a quite easy jquery question that I can't get right, when clicking on a link I need to insert some text in the right p (the table row before).
This is the html:
<table>
<tr>
<td>
<p class='MyClass'>NOT HERE</p>
</td>
</tr>
<tr>
<td>
<p class='MyClass'>NOT HERE</p>
</td>
</tr>
.
. //Many table rows
.
<tr>
<td>
<p class='MyClass'>HERE I WANT TO INSERT THE TEXT</p>
</td>
</tr>
<tr>
<td>
<div>
<a href='#' class='MyLink'>insert text</a>
</div>
</td>
</tr>
</table>
This is the jquery:
$('.MyLink').click(function() {
HOW CAN I MAKE SOME TEXT GO INTO THE RIGHT <p> HERE?
});