Supposing you have:
<div><p>Some text</p><p>Some text</p></div>
<div><p id='paragraph'>Some text</p></div>
How can you use javascript to find the index of the parent node of id 'paragraph'? I think you have to loop through, with 'docment.getElementsByTagName('div'), but I'm stuck after that. Thanks for any advice.