using jquery i'm trying to traverse some dom objects, then hide one. heres some example html
If I break the above down to $("#"+elementID).Parent() it gets the parent ok but i can't seem to find a way to use that to get the p.SummaryTextHolder element.
Code:
HideShowElement(elementID)
{
// here I'm changing the 'elementID''s object supplied to this
// so that the element is now showing. I can do this fine
// Here I need to use the element above and traverse up to get its parent
// then get the paragraph child that has the class SummaryTextHolder" and hode this element.
// I was trying the following but it doesn't seem to work.
$("#"+elementID).Parent().("p.SummaryTextHolder").Hide();
}
<div>
<div id="g10d3" display="hidden">
<p>blar blar some more text</p>
</div>
<p class="SummaryTextHolder">This is the paragraph I want to hide</p>
<img src="test.jpg" alt="test" onClick="HideShowElement("g10d3")"/>
</div>
If I break the above down to $("#"+elementID).Parent() it gets the parent ok but i can't seem to find a way to use that to get the p.SummaryTextHolder element.