Hi, can anyone offer a selector to do away with this horrible chunk of code:
// img is the image element...
var descriptionContent = $(".descriptionContent", img.parent("td").parent("tr").next("tr"));
The html looks like this:
<table>
<tr>
<td><img /></td>
</tr>
<tr>
<td><div class="descriptionContent" /></td>
</tr>
<!-- Repeat n times -->
</table>
Given a user has clicked on the img, I need to get the next (and only the next) .descriptionContent
element.
Thanks,
K