Hi guys!
I've been trying to put together a JQuery script that does the following but so far I have had no success at all. If anyone can help out with this I'd be more appreciative.
I'm looking for a jQuery script that looks for all the h1's in a document who's next sibling is a p element. There can be multiple of these on a page like this:
Now. I'd like to make it so that when the h1 element is clicked it hides the p element with all of it's contents. I can't seem to figure out how to do this.HTML Code:<h1>Blah</h1> <p> // Some content goes in here. </p> <h1>Blah2</h1> <p> // Some content goes in here. </p>




Reply With Quote