Reputation: 1089
My markup is somthing like this. I need to grab the div's content and my current context is the img tag.
<td>
<IMG style="CURSOR: hand" border=0 alt=Selected align=absMiddle src="/_layouts/images/rbsel.gif">
</td>
<td>
</td>
<td>
<div> Some text </div>
</td>
I am trying to select the parent td of the IMG and then select the second sibling of the parent td in oder to get to the div. But it doesn't seem to work. Please help
$("IMG[src*='/_layouts/images/rbsel.gif'].parent('td').nextAll().eq(1)").hide();
Upvotes: 0
Views: 60
Reputation: 7984
You'll get more success with this
$("IMG[src*='/_layouts/images/rbsel.gif']").parent('td').nextAll().eq(1).hide();
rather than
$("IMG[src*='/_layouts/images/rbsel.gif'].parent('td').nextAll().eq(1)").hide();
Upvotes: 3