I have this HTML from an external website that I need to parse with jQuery. I'm only interested in the text inside the main div (like described in the code).
The problem is, if I use $('#main').text()
I get all texts inside the div, even from the nested divs.
<div id="main">
<div><h1>....</h1></div>
<div>Other Text</div>
I only want to parse this text
<div></div>
<div></div>
</div>
Any advice?