Hi. I would like to find if a specific selection or element is inside another node, but I would like to go from the bottom up. For example if a text node is inside a form node.
<form id="theForm">
...
other nodes
nested nodes
my selection: <p>Test me</p>
...
</form>
<for id="anotherForm">
...
And if we add a link to each segment as follows? Does it makes any difference if there are other elements between "main-container" and the SPAN as far as they are still under the "main-container" DIV?
<div id="main-container">
<a href="#">
<img src="pic1.jpg"
<span>some text</span>
</a>
<a...
How can I select the SPAN elements inside of a HTML code that has a pattern/structure as follows:
<div id="main-container">
<img src="pic1.jpg"
<span>some text</span>
<img src="pic2.jpg"
<span>other text</span>
</div>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.