Navigating up and down the DOM
Sorry if this is long and complicated. Maybe there is an easy way to do this, but I'm not figuring it out.
Sample html:
<div class="story">
<h4>
<p> (several)
<div class="pullquote">
<p> (several)
</div>
<h4>
<p> (several)
</div>
(several stories)
I want to hide the p and h4 in the stories, leave the pullquote and append a button to the pullquote that says "Read more". I can do this, so far.
Clicking the button will show all the p and h4 in the story, and also hide the button. I can find the parent div.story, but I can't seem to go back down the DOM to select all the p and h4 below.
Any help? I'm new to the forum, so tell me what to do.
After that, I also need to find any p or h4 in other stories that was shown by a previous click, and hide them again.
Thanks.