hello all (newbie here)
in my situation, $(this) contains a nice chunk of html code which i need to parse.
i need to extract all the display text associated with <a> tags that are embedded inside of <li> tags.
i know this should be very simple!
i tried both of of these (below) which display the html, but i cant figure out how to parse it from there.
$(this>'li'>'a').each(function(index) {
alert(index + ': ' + this.innerHTML );
});
$.each(this, function(index) {
alert(index + ': ' + this.innerHTML );
});
the html inside of $(this) looks something like this:
<ul>
<li>
<a href='#'>Item-One</a>
<ul>......</ul>
</li>
<li>
<a href='#'>Item-Two</a>
<ul>..............</ul>
</li>
</ul>
any help is greatly appreciated!